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

DatePicker with custom format does not kendoValidate

3 Answers 190 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
iCognition
Top achievements
Rank 1
iCognition asked on 09 Oct 2015, 01:25 AM

When I run kendoValidator.validate() on a form with the following, it fails to validate:

 

                @(Html.Kendo().DateTimePickerFor(model => Value)
                    .Format("d MMMM yyyy at hh:mm tt")
                    .HtmlAttributes(htmlAttributes))​

Shouldn't the kendoValidator know to look at the format? How should I get this to work?

3 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 12 Oct 2015, 01:57 PM
Hello Matt,

Try to override the mvcdate rule like described in the following article and see how it works:



Regards,
Viktor Tachev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
iCognition
Top achievements
Rank 1
answered on 15 Oct 2015, 03:09 AM
Overriding "kendo.ui.validator.rules.mvcdate" as described in the link causes all my fields to fail to validate.
0
Viktor Tachev
Telerik team
answered on 15 Oct 2015, 02:42 PM
Hi Matt,

Please ensure that the format set in the validator is the same as the one specified for the DateTimePicker. In case the issue persists please send us a sample project where the behavior is replicated. This will enable to examine the setup and look for what could cause the issue.

Regards,
Viktor Tachev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Date/Time Pickers
Asked by
iCognition
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
iCognition
Top achievements
Rank 1
Share this question
or