I'm developing a solution that needs to optimize the time to feed the system with dates, which for many times is very repetitive.
PROBLEM: One of the fields that inserts date, I just want the year and the month. I formatted it to receive year and month, but the user needs to arrive until the day for the input to receive the year and the month, and this is not necessary. Theoretically, it could solve this with the dataviewer's "minViewMode" and "maxViewMode" attributes, but it starts in the "month" window but does not recognize "maxViewMode: 1" to stop there, proceeds until the day is selected. >
$('#database').datepicker({
language: 'pt-BR',
startView: 1,
minViewMode: 1,
maxViewMode: 1,
format: 'MM/yyyy',
/*
//beforeShowDay:unavailable
//beforeShowDay: onlyPastdays
autoclose: true,
minViewMode: 1,
format: 'mm/yyyy' */
});
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script><linkhref="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><divclass="input-group col-lg-12">
<span class="input-group-addon botao-label">Data-Base:</span>
<input type="text" class="form-control" id="database" />
<span class="input-group-addon">
<i class="glyphicon glyphicon-calendar"></i>
</span>
</div>