2009-11-21 03:30:31 +01:00
|
|
|
(function($) {
|
2009-11-21 03:33:06 +01:00
|
|
|
$.concrete('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').concrete({
|
2009-11-21 03:32:32 +01:00
|
|
|
onmatch: function() {
|
|
|
|
this.find('input').each(function() {
|
|
|
|
var conf = $(this).metadata();
|
|
|
|
if(conf.minDate) conf.minDate = new Date(Date.parse(conf.minDate));
|
2009-11-21 03:33:06 +01:00
|
|
|
|
2009-11-21 03:32:32 +01:00
|
|
|
$(this).datepicker(conf);
|
|
|
|
});
|
|
|
|
}
|
2009-11-21 03:33:06 +01:00
|
|
|
});
|
2009-11-21 03:32:32 +01:00
|
|
|
});
|
2009-11-21 03:30:31 +01:00
|
|
|
}(jQuery));
|