diff options
| author | Tristan Zur <tzur@ccwn.org> | 2012-04-28 17:06:39 +0200 |
|---|---|---|
| committer | Tristan Zur <tzur@ccwn.org> | 2012-04-28 17:06:39 +0200 |
| commit | 139dbc9cc21fb1d419c6ecc80380f723e613efbc (patch) | |
| tree | 3bfa5c3ee5c84e2ff9ec7ccef2b27f1f378a6a19 /protected/extensions/CJuiDateTimePicker | |
| parent | 2d4bddcbf7b816f86db6f308a4d11bc9787c1f99 (diff) | |
- AuditTrail Berechtigungen gesetzt (Nur Admin)
- Fehler in Extension "CJuiDateTimePicker" beseitigt
- DateCompareValidator hinzugefügt
- DateRangeValidator hinzugefügt
- Datenbanktabellennamen geändert
- Views für die Veranstaltungen bearbeitet
Diffstat (limited to 'protected/extensions/CJuiDateTimePicker')
| -rw-r--r-- | protected/extensions/CJuiDateTimePicker/CJuiDateTimePicker.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/protected/extensions/CJuiDateTimePicker/CJuiDateTimePicker.php b/protected/extensions/CJuiDateTimePicker/CJuiDateTimePicker.php index 3a73cb6..8d5bdf4 100644 --- a/protected/extensions/CJuiDateTimePicker/CJuiDateTimePicker.php +++ b/protected/extensions/CJuiDateTimePicker/CJuiDateTimePicker.php @@ -3,6 +3,7 @@ * CJuiDateTimePicker class file. * * @author Anatoly Ivanchin <van4in@gmail.com> + * @author Tristan Zur */ Yii::import('zii.widgets.jui.CJuiDatePicker'); @@ -11,6 +12,7 @@ class CJuiDateTimePicker extends CJuiDatePicker const ASSETS_NAME='/jquery-ui-timepicker-addon'; public $mode='datetime'; + public $phpDateFormat = 'dd.MM.yyyy HH:mm'; public function init() { @@ -34,9 +36,11 @@ class CJuiDateTimePicker extends CJuiDatePicker else $this->htmlOptions['name']=$name; - if($this->hasModel()) - echo CHtml::activeTextField($this->model,$this->attribute,$this->htmlOptions); - else + if($this->hasModel()) { + // Add support for model attribute and date time formatting + $this->value = CHtml::resolveValue($this->model, $this->attribute); + $this->value = Format::displayDateTime($this->value); + } echo CHtml::textField($name,$this->value,$this->htmlOptions); |
