DatePicker Mask feature

2 posts, 0 answers
  1. Scott
    Scott avatar
    1 posts
    Member since:
    Mar 2009

    Posted 01 Oct 2009 Link to this post

    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
  2. Dimo
    Admin
    Dimo avatar
    8457 posts

    Posted 02 Oct 2009 Link to this post

    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.
Back to Top