Im have to do a Website-Project and i will use the input type "datetime-local" to choose a date+time. When i write some Numbers in it, the YEAR will always have 7 characters (instead of 4).
How can i change this?
Greetings
HTML specification doesn't define the upper limit of dates for <input type=datetime-local>
. However, ECMA Script defines the upper limit of Date
object. It's September 13 275,760.
You can set the upper limit in your HTML, and Google Chrome shrinks the year field if it's less than 6 digits.
<input type="datetime-local" max="9999-12-31T23:59">
yyyy-MM-ddThh:mm
. Note that "T" is literally "T". More info developer.mozilla.org/en-US/docs/Web/HTML/Element/input/…