Skip to content

Instantly share code, notes, and snippets.

@robtarr
Created May 7, 2012 14:32
Show Gist options
  • Save robtarr/2628089 to your computer and use it in GitHub Desktop.
Save robtarr/2628089 to your computer and use it in GitHub Desktop.
Form Validation and jQueryUI Datepicker
.valid {
background: green;
color: #fff;
}
.error {
background: red;
color: #fff;
}
<form id="jQueryValidateTest">
<input type="date" required>
</form>​
$(function() {
$( "#jQueryValidateTest" ).validate();
$( "[type=date]" ).datepicker({
onClose: function() {
$( this ).valid();
}
});
});
name: jQuery 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
- http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js
normalize_css: no
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment