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

DatePicker input valdiation

3 Answers 86 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Anton
Top achievements
Rank 1
Anton asked on 15 Sep 2016, 07:32 AM

Hello,

I would like DatePicker to validate obviously invalid user input, but it doesn't happen. Why?

I use the following code:

<input type="text"/>
 
<script>
    kendo.culture("en-GB");
    $('input').kendoDatePicker();
 /script>

 

Here is it in dojo:  http://dojo.telerik.com/IHoSa

 

What are the steps to enable validtion of user's input?

 

Thanks

3 Answers, 1 is accepted

Sort by
0
Accepted
Patrick | Technical Support Engineer, Senior
Telerik team
answered on 15 Sep 2016, 08:47 PM
Hello Anton,

Please take a look at this Kendo UI Dojo by Progress illustrating a Kendo Datepicker with validation.  

The validator in the example checks to see if the value is a valid date.  By setting the rules,  you can set what kind of values are allowed.  If it is not valid, the message appears next to the Kendo DatePicker.  I also have a message for the required attribute.

I would suggest going through our overview of the Kendo UI Validatorour demos, and the API Reference.

I hope this helps!

Regards,
Patrick
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Anton
Top achievements
Rank 1
answered on 16 Sep 2016, 05:16 AM

Hello Patrik,

 

Oh, ok, I hoped there is a easier way. Ok, got it. Thanks!

 

Anton

0
Patrick | Technical Support Engineer, Senior
Telerik team
answered on 16 Sep 2016, 02:36 PM
Hi Anton,

Glad to help!  

Regards,
Patrick
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Date/Time Pickers
Asked by
Anton
Top achievements
Rank 1
Answers by
Patrick | Technical Support Engineer, Senior
Telerik team
Anton
Top achievements
Rank 1
Share this question
or