HTML5 Date Input 6 digit year

date, html

Solution

the max attribute is working, as far as i know...

the format of max is trickey, if you put the correct format everything will work fine....

see here for example:

http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_input_max_min_date

Problem

I have a standard `<input />` control on my form, decorated with `type="date"` When rendered, it displays the correct watermark of `yyyy-mm-dd`, and you can select a date correctly. However, when you try type in a value, the year extends to 6 digits, instead of four. I have added screenshots to help demonstrate the issue I'm having. Is anyone else getting this? I'm using Chrome ( Version 35.0.1916.153 m ) as my default browser. I'd like a way to force a 4year input that doesn't involve extra JS.

Original source

Related problems