Larger input date and time fields on iOS

Struggling to get any browser on iOS devices (iPhone + iPad) to render input date and time fields properly? I managed to fix it with the following CSS:

input[type="date"], input[type="time"] {
    min-height: 2.5rem;
    min-width: 95%;
}

Without this you get a tiny box on iOS which is too hard to click. With it you get a reasonable size, at the cost of it being a bit larger than normal on devices not locked within the Apple walled garden. You can see it in action on Pick a Date.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.