HTML5 pattern for formatting input box to take date mm/dd/yyyy?

后端 未结 6 2083
轻奢々
轻奢々 2020-12-28 15:25

I used jQuery datepicker and I want to restrict my input field with a HTML5 pattern if a user, instead of getting the date from jQuery datepicker, types the date.

H

6条回答
  •  误落风尘
    2020-12-28 15:52

    Below pattern perfectly works in case of leap year and as well as with normal dates. The date format is : YYYY-MM-DD

    
    

    I got this solution from http://html5pattern.com/Dates. Hope it may help someone.

提交回复
热议问题