InsertDateTimeDialog - how can we add more formatting options?

2 posts, 0 answers
  1. Rob
    Rob avatar
    238 posts
    Member since:
    Jan 2009

    Posted 31 Jul 2013 Link to this post

    Hello,

    I have been asked to add more formatting options to the InsertDateTimeDialog, specifically US format strings which are "mm/dd/yyyy" instead of "dd/mm/yyyy".

    What is the best way to approach this?

    Thanks in advance, 
    Rob
  2. Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 02 Aug 2013 Link to this post

    Hello Rob,

    The best way to achieve this is to implement your own InsertDateTimeDialog and mark it with the [CustomInsertDateTimeDialog] attribute. As RadRichTextBox loads all dialogs through MEF, this will ensure that the custom implementation will be used instead of the default one.

    Please find attached a zip with a possible implementation of a CustomInsertDateTimeDialog. I have just taken the default implementation and changed the name of the class and attribute from "Default~" to "Custom~". All you need to do is to change patterns added in the GetDateFormatPatterns method.

    I hope this helps.

    Regards,
    Iva Toteva
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
Back to Top