*}{if $field->isImmutable()} disabled{/if}{*
*}{if $field->getEarliestDate() !== null} min="{$dateFormFieldEarliestDate}"{/if}{*
*}{if $field->getLatestDate() !== null} max="{$dateFormFieldLatestDate}"{/if}{*
+ *}{foreach from=$field->getFieldAttributes() key='attributeName' item='attributeValue'} {$attributeName}="{$attributeValue}"{/foreach}{*
+
*}>
*}{if $field->isImmutable()} disabled{/if}{*
*}{if $field->getEarliestDate() !== null} min="{$dateFormFieldEarliestDate}"{/if}{*
*}{if $field->getLatestDate() !== null} max="{$dateFormFieldLatestDate}"{/if}{*
+ *}{foreach from=$field->getFieldAttributes() key='attributeName' item='attributeValue'} {$attributeName}="{$attributeValue}"{/foreach}{*
+
*}>
* @package WoltLabSuite\Core\System\Form\Builder\Field
* @since 5.2
*/
-class DateFormField extends AbstractFormField implements IAutoFocusFormField, ICssClassFormField, IImmutableFormField, INullableFormField {
+class DateFormField extends AbstractFormField implements IAttributeFormField, IAutoFocusFormField, ICssClassFormField, IImmutableFormField, INullableFormField {
+ use TInputAttributeFormField {
+ getReservedFieldAttributes as private inputGetReservedFieldAttributes;
+ }
use TAutoFocusFormField;
use TCssClassFormField;
use TImmutableFormField;
return $this;
}
+
+ /**
+ * @inheritDoc
+ * @since 5.4
+ */
+ protected static function getReservedFieldAttributes(): array {
+ return array_merge(
+ static::inputGetReservedFieldAttributes(),
+ [
+ 'max',
+ 'min',
+ ]
+ );
+ }
}