This is a migrated thread and some comments may be shown as answers.

DatePicker unobtrusive validation

1 Answer 158 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dimitar
Top achievements
Rank 1
Dimitar asked on 03 Jan 2012, 03:18 PM
Hi Telerik, Happy New Year!

We are having an issue with the DatePicker - it seems that with the jquery plugin for unobtrusive validation (jquery.validate.js)

A very similar case is reproducible this demo - http://demos.telerik.com/aspnet-mvc/razor/grid/editingajax

In the attached screenshot, you can see in the Firebug console that the rest of the inputs properly return 0/false when the .valid() method is called, but the DatePicker returns 1/true. This allows the grid record (or a form in my case) to be submitted even though the DatePicker should be recognized as invalid.

Regards,
Dimitar Milushev

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 04 Jan 2012, 10:20 AM
Hello Dimitar,

 
ASP.NET MVC3 does not render required "data-val-date" attribute, which is used by the unobtrusive plugin to check whether the input has valid date. Check this link for more information and this one too.

All the best,
Georgi Krustev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
Date/Time Pickers
Asked by
Dimitar
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or