3 Answers, 1 is accepted
Hello Gerardo,
Indeed, you can create a custom attached property and then set it via an implicit style (in your App.xaml, for example) to apply it to all RadDateTimePicker instances in your application. In the property's property changed callback you can set the desired formats of the created CultureInfo as shown in the Formatting article.
Please let me know whether such an approach would work for you.
Regards,
Dilyan Traykov
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Thank you for your response Sir.
I was able to apply the custom Date format with that approach.
I have set the DisplayFormat to Long and have a custom property Longdateformat to "dd-MMM-yyyy" and displays the value properly.
With those property set, I can input the following and have the display format of "28-Feb-2021"
28-feb-2021
02-28-2021
But when I input 28-02-2021 it displays an error.
Is it possible to accept the 28-02-2021 since the display format is "dd-MMM-yyyy"?
Hello Gerardo,
Can you please specify what CultureInfo you've set as the Culture of the control?
I tried replicating the behavior you described in a small sample project, however, the " 28-02-2021" input is parsed successfully.
Can you please have a look at the attached project and let me know how it differs from the one at your end?
Regards,
Dilyan Traykov
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.