silverstripe-framework/javascript/CalendarDateField.js
Ingo Schommer 8256228e69 MINOR Upgraded jQuery.entwine (formerly known as jQuery.concrete) to the latest trunk
MINOR Updated jQuery.concrete references to point to the new "entwine" name

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102695 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-13 05:45:29 +00:00

21 lines
519 B
JavaScript
Executable File

(function($) {
$.entwine('ss', function($){
/**
* Formats a <input type="text"> field with a jQuery UI datepicker.
*
* Requires: concrete, ui.datepicker, jquery.metadata
*
* @author Ingo Schommer, SilverStripe Ltd.
*/
$('.calendardate').entwine({
onmatch: function() {
this.find('input').each(function() {
var conf = $(this).metadata();
if(conf.minDate) conf.minDate = new Date(Date.parse(conf.minDate));
$(this).datepicker(conf);
});
}
});
});
}(jQuery));