mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
dca8c0cb6f
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92557 467b73ca-7a2a-4603-9d3b-597d59a354a9
21 lines
521 B
JavaScript
Executable File
21 lines
521 B
JavaScript
Executable File
(function($) {
|
|
$.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({
|
|
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)); |