1
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 a select input is changed that is within the same as the date input, if any, 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() } );
Only every time I change the information in select the datapicker opens itself in the first input, only it opens blank, as if it had used the "refresh".
How can I make the datepicker not open alone when I change something on his side?
I don’t quite understand your problem. You can take a look at this jsFiddle: http://jsfiddle.net/3ox5ax7z/ and adapt by explaining how you want it to work?
– Sergio