by silvestrov · 1mo ago · 0 comments
They are only simple when you have no restrictions on which dates that can be selected.
But a date picker for a hotel, airplane travel, restaurant, ... might have to show some days as disabled or some days that are "cheap offer" dates.
To this add anything that needs to select an interval, like an airplane return ticket.
Those business rules, daylights savings (datetimes that can never happen, or happen twice), different M/D/Y ordering, different starting day of week, different timezones (including 15 or 30 minute offset ones like India, Iran, parts of Australia, etc), etc quickly complicate it. Oh, and don't forget about making it accessible.
That's before you even get into designers who want the date picker to look the same across platforms instead of using platform specific UI widgets...
I'm pretty sure my version of hell would be implementing a date picker until all stakeholders are happy with it (eternity).
I'd settle for a browser specific picker that works in 80-90% of use cases. Instead it took browser several years after introudcing type=date to make a datepicker that is actually usable, and not a throwaway tiny design cooked up by an underpaid intern