Pickin’ dates on iOS

This is a little follow-up to my post about web components for date inputs.

If you try the demo on iOS it doesn’t work. There’s nothing stopping you selecting any date.

That’s nothing to do with the web components. It turns out that Safari on iOS doesn’t support min and max on date inputs. This is also true of any other browser on iOS because they’re all just Safari in a trenchcoat …for now.

I was surprised — input type="date" has been around for a long time now. I mean, it’s not the end of the world. You’d have to do validation on inputted dates on the server anyway, but it sure would be nice for the user experience of filling in forms.

Alas, it doesn’t look like this is something on the interop radar.

What really surprised me was looking at Can I Use. That shows Safari on iOS as fully supporting date inputs.

Maybe it’s just semantic nitpickery on my part but I would consider that the lack of support for the min and max attributes means that date inputs are partially supported.

Can I Use gets its data from here. I guess I need to study the governance rules and try to figure out how to submit a pull request to update the currently incorrect information.

Have you published a response to this? :

Responses

Dan Burzo

@adactio I was surprised to find a different date picking UI than I remember. iOS Safari had that slot-machine day-month-year picker that enforced `min` and `max` in a very frustrating way. Maybe a better equivalent is in the works for the new UI?

# Posted by Dan Burzo on Tuesday, April 16th, 2024 at 8:45am

Curtis Wilcox

@adactio This other CanIUse page says “Partial” in part because mobile Safari permits the selection of dates prior to `min` and after `max`. That’s what ios404.com is citing.

https://caniuse.com/input-datetime

However, MDN may not include that qualifier for `input=date` because mobile Safari does support use of the attributes for form validation.

https://bugs.webkit.org/show_bug.cgi?id=223128

https://codepen.io/ccwilcox/pen/abxaLMM?editors=1010

Date and time input types | Can I use… Support tables for HTML5, CSS3, etc

5 Shares

# Shared by Sebastian Laube on Tuesday, April 16th, 2024 at 8:47am

# Shared by Paul Kinlan on Tuesday, April 16th, 2024 at 9:14am

# Shared by Baldur Bjarnason on Tuesday, April 16th, 2024 at 9:40am

# Shared by crashposition on Tuesday, April 16th, 2024 at 10:43am

# Shared by Thomas Steiner :chrome: on Wednesday, April 17th, 2024 at 6:35am

6 Likes

# Liked by Dan Burzo on Tuesday, April 16th, 2024 at 9:13am

# Liked by Andrew Maier on Tuesday, April 16th, 2024 at 9:40am

# Liked by lilo on Tuesday, April 16th, 2024 at 10:43am

# Liked by Alex 🍜 on Tuesday, April 16th, 2024 at 12:55pm

# Liked by Kai on Wednesday, April 17th, 2024 at 8:40am

# Liked by Pierre Spring on Wednesday, April 17th, 2024 at 7:03pm

Related posts

Making the website for Research By The Sea

Having fun with view transitions and scroll-driven animations.

Preventing automated sign-ups

Here’s a bit of PHP I’m using on The Session.

button invoketarget=”share”

An alternate route to a declarative version of the Web Share API.

Lost in calculation

A lazy option for responsive images is at hand.

Making the Patterns Day website

The joy of getting hands-on with HTML and CSS.

Related links

Building WebSites With LLMS - Jim Nielsen’s Blog

And by LLMS I mean: (L)ots of (L)ittle ht(M)l page(S).

I really like this approach: using separate pages instead of in-page interactions. I remember Simon talking about how great this works, and that was a few years back, before we had view transitions.

I build separate, small HTML pages for each “interaction” I want, then I let CSS transitions take over and I get something that feels better than its JS counterpart for way less work.

Tagged with

Tagged with

HTML Is Actually a Programming Language. Fight Me | WIRED

When haters deny HTML’s status as a programming language, they’re showing they don’t understand what a language really is. Language is not instructing an interlocutor what to do in a way that leaves no room for other interpretations; it is better and richer than that. Like human language, HTML is conversational. It is remarkably adept at adapting to context. It can take a different shape on any machine, from a desktop browser or an e-reader screen to a mobile app or a screen reader for the blind (so long as that device is built to present hypertext).

Hell, yeah!

Ultimately, even as HTML has become the province of professionals, it cannot be gatekept. This is what makes so many programmers so anxious about the web, and sometimes pathetically desperate to maintain the all-too-real walls they’ve erected between software engineers and web developers.

Hell, yeeeeaaaaahhh!!!

What other programmers might say dismissively is something HTML lovers embrace: Anyone can do it. Whether we’re using complex frameworks or very simple tools, HTML’s promise is that we can build, make, code, and do anything we want.

Tagged with

MomBoard: E-ink display for a parent with amnesia

Technology doesn’t have to be terrible. Here’s an absolutely wonderful use of an e-ink display:

I made as much use of vanilla HTML and CSS as possible. I used a small amount of JavaScript but no framework or other libraries.

Tagged with

An origin trial for a new HTML <permission> element  |  Blog  |  Chrome for Developers

This looks interesting. On the hand, it’s yet another proprietary creation by one browser vendor (boo!), but on the other hand it’s a declarative API with no JavaScript required (yay!).

Even if this particular feature doesn’t work out, I hope that this is the start of a trend for declarative access to browser features.

Tagged with

Previously on this day

5 years ago I wrote Podcasts

Four audio outings.

6 years ago I wrote Three more Patterns Day speakers

Three fantastic speakers have been added to the roster of this year’s unmissable one-day event dedicated to design systems, pattern libraries, style guides, and components.

10 years ago I wrote 100 words 025

Day twenty five.

14 years ago I wrote The Kindle connection

For all the faults with its digital books, this little device is proving its worth.

18 years ago I wrote Fake tales of San Francisco

The biggest small town in the West.

19 years ago I wrote Adactio, pour homme

The perfume of the movie of the website… you read it here first.

20 years ago I wrote Transparent liquid

Good design doesn’t draw attention to itself. Really good design is invisible.

21 years ago I wrote Revenge of the DOM

There’s a new article up at A List Apart called Let Them Eat Cake. It’s all about using JavaScript, or more accurately the Document Object Model, to hide and show content on demand.

22 years ago I wrote Hot days, crazy nights

It was a gorgeously hot sunny day today.

23 years ago I wrote Best domain name ever

www.We Made Out in a Tree and This Old Guy Sat and Watched Us.com

23 years ago I wrote Hard times

I’m flattered to be mentioned in the same sentence as Jeffrey Zeldman. Mind you, I am referred to as being "british and poetic", neither of which are quite true.