This is a migrated thread and some comments may be shown as answers.
InsertDateTimeDialog - how can we add more formatting options?
1 Answer 8 Views
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 31 Jul 2013, 03:56 PM
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

1 Answer, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 02 Aug 2013, 02:27 PM
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 >>
Asked by
Rob
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Share this question
or