DatePicker in DataTable only shows US date format

Hi, just noticed that the date format in the DataTable control renders as a US format, even when we have the site locale set to ‘United Kingdom’.

Is there a way to get the DatePicker control within a DataTable to show the current site locale?

Kind regards
Andy

Hi,

Locale settings impact on the sharepoint fields, whereas the date and time format in regular controls depends on the selected UI language.

Use the following code to change the date format:
kendo.culture().calendar.patterns.d = "d/M/yyyy";
Notice this code should be executed in the ‘rendered’ event handler.

More about the date formatting: https://docs.telerik.com/kendo-ui/framework/globalization/dateformatting

Thanks Alexei, works perfectly.

Dear Abolam,
And everyone else reading this topic right now. As of version 1.3.1, all public controls, including DataTable, that you add to SharePoint Forms will use SharePoint date format from Regional settings.

Hi @Nikita_Kurguzov and @AlexZver ,

Is this only in the cloud? The date is not in the EU format in the datatable but my regional Settings are correct.

This is the form:
image

And this is a snip of the datatable:
image

We are using Plumsail Forms 1.4.8 (onprem).

Dear @asmita_adh,
The future update for SharePoint 2019 should fix the issue. We're expecting to release it in October.

1 Like

Hi,

An update about this topic…
This problem occurred only when using a date configured as string in the datatable.
When changing the datatable field to a ‘date’ type, the date is showing correctly.

Regards,
Johan

Dear @Johan,
Can you clarify what you mean by that? Why would the Date column be set to a String type? Use Date type for dates, and String type for text.

Dear Nikita,
Apologies for the confusion. I meant that this is not a bug. Like you said, you have to use a date field type instead of a text field. If you use a text field type, you get the same behaviour as Asmita.

Regards