HTML5 input type="date" tag ignoring assigned value in script-triggered picker in Firefox
Can someone offer a workaround for this problem?
Objective: allow date picker to appear when wrapper element is clicked for a date element which does not allow direct access.
In Firefox, the picker that appears when input is clicked presents the current date rather than the value on the tag.
When the user selects a date, that becomes the value of the input and is what the picker presents on the next click of the input.
I use JavaScript to trigger picker and retrieve/assign the date value for the date inputs:
Example:
User clicks start date, the picker appears and user selects 10/1/2023 date. Result is the value for start date becomes 2023-10-01 and the change function updates the end date input value to 10/7/2023 and the input value reflects the new value.
In Firefox, when the user clicks on the end date input for the first time, the picker appears with "today's date" selected, not the value assigned to the end date input.
I have resorted to a JS Datepicker plugin library to offer users a consistent cross-browser experience since the Firefox date picker is deficient until fixed.
0 Replies