Date format is US only
david-pfx opened this issue · 10 comments
All dates displayed by Evolutility seem to be in US format (mm/dd/yyyy).
The culprit code appears to be this line in format.js:64.
return dateParts[1]+'/'+dateParts[2]+'/'+dateParts[0];
It really does need to format dates according to national preferences (mine are European dd/mm/yyyy).
This check-in on the naxl-ui fork uses moment
to format dates and times:
Excellent. Please submit a pull request for me to merge it.
Thanks.
Sure thing, but unfortunately your latest check-in introduces a merge conflict (on field type literals). I need to resolve that first.
Having some problems with moment and webpack. It seems that the only locales that survive into the bundle are those explicitly listed. I'm inclined to suggest luxon instead. Any objections?
I'd rather not add new dependencies.
I agree, but I don't think you can handle dates without a dependency on something. There is currently no dependency on moment, as all the mentions are commented out, so the field is open.
OK for luxon then.
I'm on it.
Your pull request is in. Thanks again.
It is working. I can close this issue.
Please do. Happy to be able to help.
I think it needs something in the readme, mentioning the issue of locales and browser settings and ensuring any needed locales have been included in the build. I'll leave that to you.