Hi,
Is there a way to change the format of dates in the DatePicker as it I want to display the date as dd/mm/yyyy. I have changed our regional settings for the site but it's still displaying the date in america format
Hi,
Is there a way to change the format of dates in the DatePicker as it I want to display the date as dd/mm/yyyy. I have changed our regional settings for the site but it's still displaying the date in america format
Hello @stefen,
You can change the format of the Date and Time field using this code:
fd.field('Date').widgetOptions = {
format: 'dd/MM/yy'
}
You can find more information about widgetOptions property of the Date and Time field here.
This does not seem to work on a Display Form.
How do I change the formatting of a field on a Display form?
Dear @sphilson,
You can try the following:
fd.field('Date').$el.textContent = fd.field('Date').value.toLocaleString('en-GB');