Merge pull request #572 from burnbright/datefield-fix

BUGFIX: DateField javascript fails when it is included in a GroupField
This commit is contained in:
Will Rossiter 2012-07-08 21:50:48 -07:00
commit 6b611c6825
2 changed files with 9 additions and 1 deletions

View File

@ -121,6 +121,14 @@ class DateField extends TextField {
return $html;
}
function SmallFieldHolder($properties = array()){
$d = DateField_View_JQuery::create($this);
$d->onBeforeRender();
$html = parent::SmallFieldHolder($properties);
$html = $d->onAfterRender($html);
return $html;
}
function Field($properties = array()) {
$config = array(

View File

@ -26,7 +26,7 @@
}
});
$('.field.date input.text').live('click', function() {
$('.field.date input.text,.fieldholder-small input.text.date').live('click', function() {
$(this).ssDatepicker();
$(this).datepicker('show');
});