Remix.run Logo
▲ DangitBobby 3 hours ago

I was excited about the native date picker and tried to use it once, only to discover that you couldn't (can't still, I assume) disable dates other than by setting min and max. Every native browser widget I've tried to use doesn't implement the features my clients expect, so I don't use them. People want a better web platform and the only way to get it is JavaScript.

▲JimDabell 2 hours ago | parent | next [-]

Yep.

“We need a date picker to schedule a visit.”

“Okay, use `<input type=date>`”

“It needs to be a date in the future.”

“No problem, add a `min="2026-10-05"` attribute.”

“And we’re only available on weekdays.”

“Okay, throw the native date picker away completely and build one yourself from scratch.”

Did nobody involved ever bother to ask what the requirements were for a date picker? Excluding dates is one of the most common requirements there is!

▲wvbdmp an hour ago | parent | next [-]

Once upon a time, there was a golden age for devex, when “the platform”, i.e. Windows, was on-prem and Microsoft wanted everyone to be able to develop software for it and have it easy to set up and run. Thus, we got very nice toys like .NET and SQL Server, which is still the easiest, most batteries-included and hands-off database to this day. As much hate as Microsoft deservedly got and still gets, it’s hard to overstate what a miracle this alignment was. A corporation’s real, intrinsic, not just stated in marketing, but legitimate goals were to actually empower customers. When does that ever happen?

Of course, this had its own misaligned incentives: Microsoft didn’t own the web, so they were only interested in improving it strictly on Windows, so they put proprietary shit in their browser. Everybody saw that this was bad and a big long struggle ensued and finally Firefox came out on top.

But with the balance shifting in favor of the web, new incentive perversions arose. To sell cloud bullshit and lock people into their platforms, web companies obviously don’t want you to have a good time developing or hosting competing products, even just for yourself, so complexity exploded and any focus on developer and operations experience went out the window. They also don’t want anyone to be able to turn of Javascript or otherwise have much control via their “user agent”, so not only do they not care about advancing “progressive enhancement”, they’d probably prefer to get rid of it.

As quickly as Firefox saved the day, one of these companies came out with their own browser, and everybody saw that this was going to be a bad idea, but they ran TV ads, so everybody switched regardless.

Actually, developers were the first ones to switch, because they were promised cool new toys, lmao.

We should have rejected clouds and we should have rejected Chrome and with some luck we could this day be living in a paradise of on-prem toys and be the princes of our orgs. Well, probably not, but still.

▲pwdisswordfishq an hour ago | parent | prev [-]

Does onchange → setCustomValidity not do the job?

▲JimDabell an hour ago | parent [-]

That lets you bring up the picker, let the user pick any date, and then show an error message if they picked an unavailable one. It doesn’t let you show dates as unavailable in the picker or prevent the user from picking them.

▲otherme123 2 hours ago | parent | prev [-]

But also custom date pickers are the most broken thing you can find everywhere. Browse with a combination of browser/phone the developer didn't test, and you can't pick even the most basic single date. The most blatant are the fancy range pickers, instead of two date picker boxes: I have been pushed to a desktop browser because the mobile renders half of it off-screen, or don't hold open after tapping the start date, or works by dragging but breaks on single taps...

▲Joker_vD 26 minutes ago | parent [-]

Yep. I've also seen a datetime picker (in a log viewing tool) where adjusting time from keyboard is nigh impossible: you have "12:30:00", with the cursor right after the "30", and want to make it "35", so you press [Backspace] — nope, deleting a digit would make an invalid time, so the component undoes it. You press "5", but inserting yet another digit would also make an invalid time, so the component undoes it. You have to text-select the zero, and then press "5" to overwrite it... and you have to do it digit-by-digit, because you can't replace two digits at once with a single key press. Amazing.

It's a lose-lose situation, honestly.