Add "endDate" and "startDate" To Your Textbox class .
<script type="text/javascript">
$(document).ready(function () {
$.validator.addMethod("endDate", function (value, element) {
var startDate = $('.startDate').val();
return Date.parse(startDate) <= Date.parse(value);
}, "* End date must be after start date");
$('#myform').validate();
});
</script>
No comments:
Post a Comment