Year 0001 not caught by minDate
Overall the code below works except that years, 0000 - 0099, do not trigger the minDate rule. Could anyone point out what I am missing.
Thanks
jQuery Validation Plugin 1.9.0
jquery.ui.datepicker.validation 1.0.1
Jquery 1.7.1
- $(function () {
- $("#date_from, #date_to").datepicker({
minDate: "-50y",
maxDate: "+50y",
onClose: function () {
$(this).valid();
}
})
$("#aspnetForm").validate({
rules: {
date_from: {
dpDate: true,
dpCompareDate: { notAfter: "#date_to" }
},
date_to: {
dpDate: true,
dpCompareDate: { notBefore: "#date_from" }
}
},
messages: {
date_from: {
dpCompareDate: "Please enter a date before the To Date."
},
date_to: {
dpCompareDate: "Please enter a date after the From Date."
}
}
- })