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

Heyho,

I've got a question regarding the Dateformat within a DataTable.
Is it possible to show the Date in the Format "D", so I can see the Date and the full Name of the Day and Month?

I tried it with:
kendo.culture().calendar.patterns.d = "D";

It shows me the right format as long as I don't press enter or click to another field. If I do this, it only shows the letter "D".

image

using Plumsail Forms for SP on Prem, version 1.8.7

Thank you for your help!

Dear @KaiFrstr,
Try this:

fd.rendered(function () {
  kendo.culture().calendar.patterns.d = "dddd, dd. MMMM yyyy";
});
1 Like

Thank you @Nikita_Kurguzov!

Thank you for your fast reply, it works like a charm! :slight_smile:

Greetings