Input displaying one day off
When selecting a date, the value is being returned correctly but it displays as one day off. This is probably because when the date objects are built they accept a string that doesn't account for time zones.
I'm still seeing this issue. I initialize with selectedDate='2000-01-20', and the dropdowns show January 19 2000.
@JMcAmmond is right, it relates to Time Zones. Specifically, the Date(selectedDate) constructor which Mozilla recommends not using: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse
This issue is probably browser and data dependent but will reproduce on Chrome when using the recommended yyyy-mm-dd format. A workaround is to use slashes instead of dashes as the delimiter; this causes Date.parse to interpret the date in local time. Adding .replace(/-/g, '/') to my date string worked well.
@biomiker Is this still a problem ? Do you have a workaround ?
The workaround I mentioned on Jul 31 is still necessary. I use yyyy/mm/dd instead of yyyy-mm-dd.