| ▲ | RobotToaster 7 hours ago | |||||||||||||
<input type="date"> is automatically formatted based on the user's locale. | ||||||||||||||
| ▲ | suzzer99 2 hours ago | parent | next [-] | |||||||||||||
Input type=date also just saves the day, month and year with no timezone information, which makes sense since the widget doesn't show any and context determines if the date should be in the user's timezone or a fixed timezone (like an event start date or a flight departure). But if you don't immediately convert that date to an ISO date and instead save it to the DB as yyyymmdd, you're in for a world of hurt trying to display date/times throughout the site. I inherited a project like this and have spent countless hours wrestling with nightmare timezone issues. | ||||||||||||||
| ▲ | 8organicbits 7 hours ago | parent | prev [-] | |||||||||||||
This is still a partial solution as the user needs to know that their locale is being used and know how their locale is configured to understand the format. This is most problematic on shared computers or kiosks, especially when traveling. | ||||||||||||||
| ||||||||||||||