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

WaterMark in RadDatePicker + issues in validation

4 Answers 74 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ash
Top achievements
Rank 1
Ash asked on 22 May 2012, 12:59 AM
Hi,

I want to add the date format as a  watermark to the datepicker. How can i do that?

Also,
when the format of the datepicker is dd/MM/yyyy. If i enter 05/20/2012 (manually) , in that case a postback occurs and the datepicker automatically changes the date to 20/05/2012.

I do not want this to happen, i want an error to be thrown as the user has to input the date in dd/MM/yyyy format only, and it has to be validated against that format.

Please let me know how i can implement the above.

4 Answers, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 24 May 2012, 08:47 AM
Hi Ash,

The picker will try to parse the value using all possible formats that it supports.
If you need to avoid that, you can handle the onValueChanging event and cancels it, parsing the text yourself.

Kind regards,
Vasil
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 RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Ash
Top achievements
Rank 1
answered on 29 May 2012, 09:06 PM
thanks for the reply.

how do i create a custom raddatepicker control? i dont want to implement the same event in each and every page.
0
Vasil
Telerik team
answered on 30 May 2012, 08:26 AM
Hello Ash,

You can make Asp User Control with picker inside and the required script.

All the best,
Vasil
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 RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Ash
Top achievements
Rank 1
answered on 04 Jun 2012, 10:19 PM
Thanks for the information.

I am handling the extra conditions in ValueChanging Event.
When i want to throw an error, for consistency i want it to look the same way as it does when telerik throws an error for date validation.
How can i achieve the same?

i want to show the error with the red outline and Exclamation in a triange.
Tags
General Discussions
Asked by
Ash
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Ash
Top achievements
Rank 1
Share this question
or