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

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.

Button types

Ideas for some declarative shortcuts.

Related links

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

Fine-tuning Text Inputs

Garrett talks through some handy HTML attributes: spellcheck, autofocus, autocapitalize, autocomplete, and autocorrect:

While they feel like small details, when we set these attributes on inputs, we streamline things for visitors while also guiding the browser on when it should just get out of the way.

Tagged with

How would you build Wordle with just HTML and CSS? | Scott Jehl, Web Designer/Developer

This is a great thought exercise in progressive enhancement …that Scott then turns into a real exercise!

Tagged with

a view source web

As a self-initiated learner, being able to view source brought to mind the experience of a slow walk through someone else’s map.

This ability to “observe” software makes HTML special to work with.

Tagged with

The quiet, pervasive devaluation of frontend - Josh Collinsworth blog

It’s like CSS exists in some bizarre quantum state; somehow both too complex to use, yet too simple to take seriously, all at once.

In many ways, CSS has greater impact than any other language on a user’s experience, which often directly influences success. Why, then, is its role so belittled?

Writing CSS seems to be regarded much like taking notes in a meeting, complete with the implicit sexism and devaluation of the note taker’s importance in the room.

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.