Add additional accepted string conversions

2 posts, 0 answers
  1. Mattias
    Mattias avatar
    2 posts
    Member since:
    Mar 2013

    Posted 24 May 2013 Link to this post

    The RadDatePicker is really cool and useful. We would like to add additional supported string formats for when the user types a date manually. This does not affect how dates are displayed, only how edit mode is treated.

    I tried to do this by assigning a Converter, but that doesn't trigger until after the RadDatePicker has already converted the string into a date. :(

    Is there any way I can override a property or implement an event or something that lets me help the RadDatePicker decode strings to dates of my choice?

    * A real example: User types "20130524" without hyphens and I return todays date; "2013-05-24".
    * Another (silly) example: User types "in three days" and I return today + 3 days; "2013-05-27".
  2. Kalin
    Admin
    Kalin avatar
    1208 posts

    Posted 29 May 2013 Link to this post

    Hi Mattias,

    In order to implement custom logic for parsing the date value, you should use ParseDateTimeValue event of the DateTimePicker. You can define the desired scenarios in the event handler in the code behind. For more detailed information regarding custom parsing please see the How to implement custom parsing article from our documentation.

    Hope this helps.

    Regards,
    Kalin
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top