Created
May 7, 2012 15:08
-
-
Save robtarr/2628275 to your computer and use it in GitHub Desktop.
Form Validation with H5F and jQueryUI Datepicker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.valid { | |
background: green; | |
color: #fff; | |
} | |
.error { | |
background: red; | |
color: #fff; | |
} | |
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form id="h5ftest"> | |
<input type="date" required pattern="\d{2}\/\d{2}\/\d{4}"> | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
H5F.setup( $( "#h5ftest" ) ); | |
$( "[type=date]" ).datepicker({ | |
onClose: function() { | |
$( this ).focus().blur(); | |
} | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: H5F Validation with jQueryUI Datepicker | |
description: Making date fields validate on datepicker close | |
authors: | |
- Rob Tarr | |
resources: | |
- https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.js | |
- https://raw.github.com/ryanseddon/H5F/master/h5f.js | |
normalize_css: no |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment