Exemple #1
0
 /**
  * Returns date
  *
  * @return \DateTime|null
  */
 public function getValue()
 {
     $value = parent::getValue();
     if ($value instanceof \DateTime) {
         $value->setTime(0, 0, 0);
         return $value;
     }
     return $value;
 }
Exemple #2
0
 /**
  * @param string $label label
  */
 public function __construct($label = null)
 {
     parent::__construct($label, 'd.m.Y H:i');
 }
 /**
  * @param ABaseDateTimeControl $control
  * @return bool
  */
 public function validateDate(ABaseDateTimeControl $control)
 {
     return $control->isDisabled() || !$control->isFilled() || $control->getValue() !== NULL;
 }