0

I'm trying to add validation to a date textbox, where if the current date picked is less than present date, a textbox appears for additional information.

I've been able to add a custom validation to it, but it only works on hitting the submit button, I'd like to know if there is a way where we can validate the date when picked to show the textbox in a dynamic way rather then hitting the submit button for the textbox to be generated.

Omair
  • 11
  • 1
  • 4
  • Use ajax validation. This question might help http://stackoverflow.com/questions/5200098/asp-net-mvc-3-ajax-form-submit-and-validation – Ashton H. Jul 17 '12 at 01:05
  • thanks, seems a bit to confusing, as my ajax knowledge is a little less, but I shall have a look into it. – Omair Jul 17 '12 at 23:25

1 Answers1

0

you can write script for this

$(function () {
    $('#textboxid').datepicker({ minDate: +0 });
});
NaYaN
  • 1,300
  • 7
  • 11