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

AutoCorrect DatePicker 2012 Q2

1 Answer 39 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Hélène
Top achievements
Rank 1
Hélène asked on 20 Sep 2012, 01:11 PM
Hello,

1) Has there been any change in the autocorrect DatePicker?  Is there anyway to disable this functionnality?  If my client types in 2012-13-02 I don't want the date to become 2012-02-13 cause maybe he mistakenly wanted to type 2012-12-02.

2)When I type an invalid date like "qwerty", how can I keep the value in the datePicker after a postback.  The field does show an exclamation mark but I would like to handle the error myself.

Thank you!

1 Answer, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 25 Sep 2012, 12:13 PM
Hi Hélène,

You could specify the format of the control's value by using DateFormat property.
<telerik:RadDatePicker ID="RadDatePicker1" Runat="server">
    <DateInput DateFormat="yyyy/dd/MM"></DateInput>
</telerik:RadDatePicker>

A possible solution is to add a hidden field and save the date as its value when the date in the RadDatePicker is changed. I prepared a small sample and attached it to this forum post.

Greetings,
Kostadin
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.
Tags
Calendar
Asked by
Hélène
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or