Skip to content

Instantly share code, notes, and snippets.

@dvhthomas
Created October 5, 2009 02:04
Show Gist options
  • Save dvhthomas/201756 to your computer and use it in GitHub Desktop.
Save dvhthomas/201756 to your computer and use it in GitHub Desktop.
// Attach calendar functionality to any element
// with a CSS class of datePick. This is safe
// if the page has multiple calendars.
$(document).ready(function() {
$('.datePick').datepicker($.extend({},
$.datepicker.regional['en'], {
onSelect: function() { }
}));
});
// Create an empty subclass of the datapicker
// so that we can override it's onSelect method
// to accomodate ASP.NET Validation control scripts
jQuery(function($){
$.datepicker.regional['en'] = {};
$.datepicker.setDefaults($.datepicker.regional['en']);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment