Now, I also happen to be working on refactor of our Intl code, so I should be able to help with the number field being inconsistent. If you can file a bug and prepare a minimized testcase, I'd be happy to fix it! :)
[0] https://bugzilla.mozilla.org/show_bug.cgi?id=888320 [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1069609
Id est: use max="100000". Then on one IE/Edge 16000 is an error but 15000 is OK. Different IE/Edge box its 18000 cap.
I have to make a custom UI component to make this work (riotjs)
I’ve got a version of Chrome here that, if you query with .value from JS the value of a datetime-local field, returns you a String in "MM/DD YYYY" format. Despite the user’s locale being de_DE.
I’ve also discovered one browser only supporting ISO8601, and another only support it if one removes the time section of it. Another only if you have a time section, but remove the time zone part at the end.
It’s such a horrible mess.
Surely you're not suggesting that the representation of the date that is returned by the browser should be locale-dependent? That would be a nightmare.
At least when it’s locale-dependent I can use a look up table and parse it somehow, but getting it back in MM/DD YYYY?
I’d love to just get ISO8601 ideally, btw, but who knows if that will ever happen.
(Also, you should check out Microsoft Excel, its date type and CSV converter are both locale-dependent. Locale of the program opening the file, not the file itself. A file created in de_DE will be unusable in en_US)
User side: just show/accept whatever the site owner wants, or if it's too difficult, stick to ISO 8601 (it's the standard, damn it).
JS side: just ISO 8601.
In that case, it varies so much across browsers to be almost unusable. Some (like Firefox) don't seem to support the calendar aspect, some have a terrible calendar UI, some fallback to the device calendar UI, some let you select invalid dates despite greying them out and that's before you get to the actual data, how it's formatted or the lack of any events associated with the fields.
Honestly, it seems like today's browsers just can't seem to handle any of the newer input types in any reasonable way.