Example #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;
 }
Example #2
0
 /**
  * @param ABaseDateTimeControl $control
  * @return bool
  */
 public function validateDate(ABaseDateTimeControl $control)
 {
     return $control->isDisabled() || !$control->isFilled() || $control->getValue() !== NULL;
 }