Wrong format/culture with DatePicker

2 Answers 22 Views
Date/Time Pickers
Ken
Top achievements
Rank 1
Iron
Ken asked on 04 Apr 2024, 05:45 PM

Hi,

We are using the current culture fr-BE which uses dd-MM-yyyy format but when using the DatePicker and inspecting the HTML, we see the following.

As you can see in the screenshot below, the culture is correctly set. 

This happens only with fr-BE, we can see no problems when switching between nl-NL, en-GB, nl-BE, etc.

When we add .Format("d") the component works correctly but that's not what I would expect, since "d" is the default.

And to be honest, I don't want to add that manually everywhere. It should take the correct one as a default.

Our current version is 2022.3.913 but updating is not possible at the moment.

Any help would be appreciated

Kind regards

 

 

2 Answers, 1 is accepted

Sort by
0
Anton Mironov
Telerik team
answered on 09 Apr 2024, 08:27 AM

Hello Ken,

Thank you for the images and the details provided.

I made a couple of tests on my side and the pointed culture("fr-BE") is being applied as expected without the need for a Format.

Here is a dojo example that I prepared for the case:

The behavior is to display the date as dd-mm-yy. I hope this is the desired result.

Kind Regards,
Anton Mironov
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages. If you're new to the Telerik family, be sure to check out our getting started resources, as well as the only REPL playground for creating, saving, running, and sharing server-side code.

0
Ken
Top achievements
Rank 1
Iron
answered on 09 Apr 2024, 08:37 AM

Hi Anton,

Thanks for the response.

You are correct that it works in javascript but sadly it does not with mvc.

Also, the version you are testing is the latest version (2024.1.319), we are on a lower version (2022.3.913).

Kind Regards,

Ken

Anton Mironov
Telerik team
commented on 12 Apr 2024, 06:20 AM

Hi Ken,

Thank you for the kind words.

I made a couple of tests on my side and here is the result with the 2002.3 version:

And the visualization of the component:


Could you please send me a runnable sample project where the issue is represented? A dojo or a REPL example will also be great.

Looking forward to hearing back from you.

Best Regards,
Anton Mironov

 

Tags
Date/Time Pickers
Asked by
Ken
Top achievements
Rank 1
Iron
Answers by
Anton Mironov
Telerik team
Ken
Top achievements
Rank 1
Iron
Share this question
or