Leave/reset WebKit's default CSS display property for date & time inputs
Many developers and front-end frameworks globally change form inputs' display to inline-block or similar.
Unfortunately, this interferes with their rendering in Chrome. So, if you do change form inputs, make sure you also reset date & time inputs with the following:
input[type="date"],
input[type="datetime"],
input[type="datetime-local"],
input[type="month"],
input[type="time"],
input[type="week"] {
display: -webkit-inline-flex;
}
This won't harm non-WebKit browsers as they'll ignore the prefixed display value.
Written by Matt Stow
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Css
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#