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

DatePicker Mask feature

1 Answer 79 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 01 Oct 2009, 01:30 PM
After using the Datepicker we have run into a hurdle. We have a solution that allows for an End Date on a form. The end date can be null or a valid date. The Datepicker allows the user to enter an invalid date (ex. 12/38/2009) and in the code behind it appears as a null entry (which is the same as leaving it blank) and does not have a code behind flag saying it is invalid. It would be great for the Datepicker not to allow typing an invalid date to begin with or to flag the entry so it is readable in code behind that it is not valid. Other datepickers from other vendors use a masked edit so you cannot type something like 12/38/2009.

Just some thoughts.  If anyone has a way to resolve this feel free to let me know.

Scott

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 02 Oct 2009, 12:51 PM
Hello Scott,

The idea of the RadDateInput control (used as a textbox in the RadDatePicker) is to allow non-masked random input, which is then parsed to a valid date, if possible.

Indeed, until present it was not possible to distinguish between "invalid date" and "no date" on the server after postback, but in the next version this will be possible: if the used has entered an invalid date, the SelectedDate property will be null, but the ValidationDate property will return the user's input.

All the best,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Calendar
Asked by
Scott
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or