I am having real trouble with this addMethod for validating a date from an input. It doesn\'t test the regex properly and i think it may be written with errors. The date should
$(function () {
$.datepicker.setDefaults({
dateFormat: 'dd/mm/yy'
});
});
Then to bind it to the input element:
$(function () {
$("#StartDate").datepicker();
});