*/ protected $attributes = [ 'type' => 'datetime-local', ]; /** @inheritDoc */ protected $format = 'Y-m-d\TH:i'; /** * Retrieves a DateStepValidator configured for a Date Input type */ protected function getStepValidator(): ValidatorInterface { $stepValue = $this->attributes['step'] ?? 1; // Minutes $baseValue = $this->attributes['min'] ?? '1970-01-01T00:00'; return new DateStepValidator([ 'format' => $this->format, 'baseValue' => $baseValue, 'step' => new DateInterval("PT{$stepValue}M"), ]); } }