Date must be selected twice to validate.
I have a questionnaire form and the validation for a date picker must be selected twice to clear the validation error.
I have a questionnaire form and the validation for a date picker must be selected twice to clear the validation error.
Yes this is because the blur event fires when the datepicker opens and then doesn't fire again once it is set.
I think the issue can be solved by calling the blur() event in the javascript after the date has been picked. If you give me a url where I can see the problem I can suggest where to add it.
Try using the onClose event of the datepicker to call the blur event of the input field.
$(function(){
$('#DOB').datepicker({
dateFormat:"d M, yy",
changeMonth: true,
changeYear: true,
yearRange: "1937:2017",
onClose: function() {
$(this).trigger('blur');
}
});
});
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.