Input constraint "type date"

Asked

Viewed 257 times

2

Code:

<input type="date" name="data" value="">
<input type="submit" class="success round button" value=""/>

I need that when I click the Ubmit button and the date field is blank it doesn’t let me submit. Have some mode in html even without JS to make this restriction ?

  • Have you tested by adding the attribute required? Thus: https://jsfiddle.net/spz8txma/

  • It’s true rs, that’s all.

1 answer

3


Browser other questions tagged

You are not signed in. Login or sign up in order to post.