This question is locked. New answers and comments are not allowed.
Hey everyone,
So here is the situation... I have a View which has two dates on it. For this discussion, they are Start Date and End Date. On the model they look like Model.StartDate and Model.EndDate (or m => m.StartDate and m => m.EndDate). I wrote a custom validator that validates the End Date occurs AFTER the Start Date.
This validator works perfectly if used with plain text boxes. It also works with the Telerik ASP.NET MVC Date Picker (latest build) if I click the Submit button. After the button click, client side validation on these date pickers work as well. HOWEVER, Client Side validation on these date pickers with my custom validator does NOT work prior to the button click. As soon as the page validation is executed the client side validation works perfectly and a subsequent button click / view validation works.
Again, the scenarios...
- Custom validator to test End Date is > Start Date - works with text boxes.
When using Html.Telerik.DatePickerFor(...)...
- Action - Setting focus away from the date picker -
----- WORKS if a the Save/Submit button has been clicked and the entire page validation is fired.
----- Does NOT work if the Save/submit button has not been clicked and the entire page validation has not yet occured.
Anyone else have this problem or is able to reproduce?
So here is the situation... I have a View which has two dates on it. For this discussion, they are Start Date and End Date. On the model they look like Model.StartDate and Model.EndDate (or m => m.StartDate and m => m.EndDate). I wrote a custom validator that validates the End Date occurs AFTER the Start Date.
This validator works perfectly if used with plain text boxes. It also works with the Telerik ASP.NET MVC Date Picker (latest build) if I click the Submit button. After the button click, client side validation on these date pickers work as well. HOWEVER, Client Side validation on these date pickers with my custom validator does NOT work prior to the button click. As soon as the page validation is executed the client side validation works perfectly and a subsequent button click / view validation works.
Again, the scenarios...
- Custom validator to test End Date is > Start Date - works with text boxes.
When using Html.Telerik.DatePickerFor(...)...
- Action - Setting focus away from the date picker -
----- WORKS if a the Save/Submit button has been clicked and the entire page validation is fired.
----- Does NOT work if the Save/submit button has not been clicked and the entire page validation has not yet occured.
Anyone else have this problem or is able to reproduce?