Home > Web Front-end > HTML Tutorial > Styling options for HTML5 date picker

Styling options for HTML5 date picker

PHPz
Release: 2023-09-01 20:29:05
forward
1306 people have browsed it

Styling options for HTML5 date picker

The date picker in HTML5 basically works very similarly to the JavaScript library, when we focus on the field a calendar pops up and we can then go by month and year Select a date.

So if you want the date input to use more spacing and color scheme you can add the following to your code.

::-webkit-datetime-edit { padding: 2 em; }
::-webkit-datetime-edit-fields-wrapper { background:green; }
::-webkit-datetime-edit-text { color: blue; padding: 0 0.3em; }
::-webkit-datetime-edit-month-field { color: red; }
::-webkit-datetime-edit-day-field { color: orange; }
::-webkit-datetime-edit-year-field { color: red; }
<input type = "date">
Copy after login

The above is the detailed content of Styling options for HTML5 date picker. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template