-
Notifications
You must be signed in to change notification settings - Fork 5
Description
We have a problem with changing dates format from mm/dd/yyyy to dd/mm/yyyy (For NES and OneLondon)
From @BogdanScherban :
Hi, Francois!
DateInput and DateField components have default date format: "MM/DD/YYYY".
I tried to set format "DD-MM-YYYY" for DateField by setting locales and options according to https://marmelab.com/react-admin/Fields.html#datefield
<DateField locales="en-GB" options={{ year: "numeric", month: "numeric", day: "numeric" }} />
Unfortunately, in this case format is the same. But what means "If Intl is not available, it ignores the locales and options props."? How can we enable using of it?
For DateInput I tried to use extra plugin https://github.com/vascofg/react-admin-date-inputs (according to RA-manual):
-
install this plugin by:
npm install react-admin-date-inputs --save -
Add required attributes to DateInput
<DateInput source="birthDate" label="Born" options={{ format: 'DD-MM-YYYY' }} fullWidth />
If we try to install this module, following error occurs:
For this reason I can't use vascofg/react-admin-date-inputs.
Besides this, I tried to solve the issue by a lot of variants which are presented at stackoverflow (and other similar sources), but all of them don't work...