Good morning, I have the following code:
var maxDate = new Date();
maxDate.setDate( maxDate.getDate() + 364);
$(".dtpBloqueio").datepicker( {
numberOfMonths: 2,
dateFormat: 'dd/mm/yy',
maxDate: maxDate
});
When you change an input select that is inside the same as the date input, if so, maxDate is set as today.
<table>
<tr>
<td>
<select name="datasLocalizaSv" id="listaDatasLocalizaSv"/>
</td>
<td>
<input id="dataComeco" name="dataComeco" class="dtpBloqueio"/>
</td>
</tr>
</table>
$(".dtpBloqueio").datepicker("change", { maxDate: new Date() } );
But every time I change the information in select the datapicker opens alone in the first input, except that it opens blank, as if it had used the "refresh". link
How can I make the datepicker not open by itself when I change something on the side of it?