Change Value to "Today" When User Enters Invalid Input

2 posts, 0 answers
  1. keith schaefer
    keith schaefer avatar
    8 posts
    Member since:
    Feb 2010

    Posted 19 Oct 2010 Link to this post

    Our product owner has told us that if the user enters bad data, the date control must display the current date rather than become blank. The value must be initialized to null (and stay null if the user tabs over without entering a value), but upon an invalid date selection it must change to the current day.

    How can I accomplish this using the RadDatePicker? I tried to find an event that triggers when the user has entered a value (at the point you are internally validating the input), but so far have not been able to find anything.
  2. Konstantina
    Konstantina avatar
    2332 posts

    Posted 20 Oct 2010 Link to this post

    Hello Keith,

    Thank you for contacting us.

    To achieve your goal you can use the ParseDateTimeValue event and implement your custom logic for validation. Set the desired date as an argument of the ParseDateTimeEventArge property and mark the IsParsingSuccessful to true.

    Hope this information helps. If you have any other questions about our controls please let us know.

    All the best,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top