Input with type date value uses incorrect value



Tech Evangelism
2 years ago
2 years ago


(Reporter: christiaan, Unassigned)


Firefox 48

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [webcompat])


(1 attachment)



2 years ago
Created attachment 8783860 [details]

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/601.7.7 (KHTML, like Gecko) Version/9.1.2 Safari/601.7.7

Steps to reproduce:

Just try to select a date in a input type=date field and it does not work correctly. 

See the attached screenshots for a comparison of chrome and firefox on an android phone (LG G4) and an android tab (Samsung Galaxy Tab)

Actual results:

When selecting a date (in a somewhat different date-picker then the device's native picker) I see an ISO formatted date value. When leaving the field the value disappears. 

Expected results:

I'd expected a correctly formatted display (in NL formatting). Also, when leaving the field I expect the value to remain

Comment 1

2 years ago
Hi Christian,

Can you please give me another example of a website with date picker where this is happening?


Comment 2

2 years ago
Did some more investigation; I think it has to do with the combination of Firefox for android and React ( 

I have a JSFiddle here that does seem to hold the input's value, although display is in incorrect format (expected locale format)

However, the following JSFiddle shows that React does not get the correct value:

After filling in a date, it should show up after the 'Hello world' text

So: the first JSFiddle does work in a way, although: 
1. It is a different datepicker than the native one (could be by design, i don't know)
2. It does use incorrect format for displaying the selected date (should be dd-mm-yyyy instead of ISO YYYY-MM-DD

The second JSFiddle has the same issues BUT also has: 
3. React Does not know what value is selected. 

So basically: The fact that the value is not maintained might be a React problem, i will look into that some more BUT the input does show an incorrectly formatted date. I do expect it's value to be in YYYY-MM-DD format, but it should be displayed in the browser's locale setting (dutch in this case). Also I'd expect the native datepicker instead of another one, although that's a minor issue. 

Hope this helps.

Comment 3

2 years ago
This is a better JSFiddle for date picker in combination with React, the selected date should show up right next to the input:

Comment 4

2 years ago
Thank you for the info Christian.

I'm able to reproduce this using: Galaxy Note 5 (Android 6.0.1) on 48 Release.

On Chrome it works properly, it shows the date correctly.

Hey Mike what is your opinion on this? Is it on Tech Evangelism component or a FF for Android bug?

Component: General → Mobile
Ever confirmed: true
Flags: needinfo?(miket)
Product: Firefox for Android → Tech Evangelism
Version: 48 Branch → Firefox 48
Bug 1283381 is a collection of issues related to <input type=date> which is still partially implemented on Desktop. 

but for the localization issue it seems to be a duplicate of Bug 872630 

See also
Flags: needinfo?(alex.caziuc)


2 years ago
Last Resolved: 2 years ago
Flags: needinfo?(miket)
Flags: needinfo?(alex.caziuc)
Resolution: --- → DUPLICATE
Duplicate of bug: 872630
You need to log in before you can comment on or make changes to this bug.