I have the following simple form:
<form>
<input name="default" type="date" required="required" /><br />
<input name="maxDate" type="date" required="required" />
</form>
If I init the jQuery UI Datepicker plugin like this:
$('input[type=date]').datepicker({
dateFormat: "yy-mm-dd"
});
$('input[name="maxDate"]').datepicker('option', {
maxDate: 0
});
The second input with the extended options will be invalid on page load (see the attached JSfiddle), until I open the datepicker in it and set some values.
I checked the Datepicker Widget API, but it looks to be the valid way to give extra option to the selected datepicker instance. Am I doing something wrong?
Thank you in advance :)
EDIT: Screenshot attached (FF 41)