Comment on Overbearing datetime pickers
bleistift2@sopuli.xyz 1 day agoWhat is wrong with the simple type=“datetime-local”
The problem with that is that it doesn’t exist.
Nitpicking aside, the problem with native browser widgets, in my opinion, are:
- tiny hit areas for desktop users
- no way to highlight certain dates (e.g., holidays) or mark dates ineligible for selection (e.g., future dates)
- no way to indicate the week of year (not an issue for most use cases)
- users don’t know how to un-select a date (you’d think the ‘clear’ button would give that away and you’d be wrong)
- the widget lets you enter invalid dates without telling the user (or the programmer, for that matter), e.g., 31 Sep.
Pika@sh.itjust.works 1 day ago
can you elaborate on type=“datetime-local” not existing? It’s been supported in almost every mainstream browser since basically 2012. The last mainstream to adopt it was Safari in 2021. There is argument that FF didn’t have proper support till 2021 as well but, that’s because it was lacking the “time” part of the element. So they modified how it worked for awhile to work like the type=“date” element, that has since been resolved.
I do agree with you on a lot of those. it would be nice to have some form of UI validation. That is one of it’s flaws that could be expanded on. a disabled dates or invalid dates tag on the input would be a lot easier, but also add a lot of complexity to it for something that should be being validated via scripts both server and client side. Not all browsers have the clear button as well which is a problem because it’s an extra step when you do make a mistake on it. They do offer a valid range tag though to allocate valid ranges for dates, but it’s so primitive that for a scheduler it can’t really be used unless its on a week by week basis
bleistift2@sopuli.xyz 1 day ago
Oh goddamn, I hate web standards sometimes.
There used to be a proposal for datetime-local, but it was dropped, even though some browsers already supported it. That’s what I meant.
However, some years later the W3C added it to the standard again.
More info: webmasters.stackexchange.com/a/59541 stackoverflow.com/a/22654498/
Pika@sh.itjust.works 1 day ago
Thank you for expanding on it. That was a pretty interesting read, gotta love indecisiveness.