コード例 #1
0
ファイル: DatePicker.php プロジェクト: pipaslot/forms
 /**
  * Returns date
  *
  * @return \DateTime|null
  */
 public function getValue()
 {
     $value = parent::getValue();
     if ($value instanceof \DateTime) {
         $value->setTime(0, 0, 0);
         return $value;
     }
     return $value;
 }
コード例 #2
0
ファイル: DateTimePicker.php プロジェクト: pipaslot/forms
 /**
  * @param string $label label
  */
 public function __construct($label = null)
 {
     parent::__construct($label, 'd.m.Y H:i');
 }
コード例 #3
0
 /**
  * @param ABaseDateTimeControl $control
  * @return bool
  */
 public function validateDate(ABaseDateTimeControl $control)
 {
     return $control->isDisabled() || !$control->isFilled() || $control->getValue() !== NULL;
 }