AbstractInputDateTime
API reference › HTML › Form › AbstractInputDateTime
5 subclasses
Provides shared immutable rendering behavior for the temporal <input> controls.
Exposes the max, min, and step validation attributes common to every control whose value is a date or a time.
Subclasses declare only the type attribute they render, and document the value format it expects.
InputDate for the date implementation.
InputDateTimeLocal for the local date and time implementation.
InputMonth for the month implementation.
InputTime for the time implementation.
InputWeek for the week implementation.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$attributes protected | mixed[] | HTML attributes array used by the implementing class. Default: []. | UIAwesome\ |
$prefix protected | string | Prefix content string assigned to the element. Default: ''. | UIAwesome\ |
$prefixAttributes protected | array | HTML attributes array for the prefix element. Default: []. | UIAwesome\ |
$prefixTag protected | false|UnitEnum | Tag name for the prefix element, or false to disable. Default: false. | UIAwesome\ |
$suffix protected | string | Suffix content string assigned to the element. Default: ''. | UIAwesome\ |
$suffixAttributes protected | array | HTML attributes array for the suffix element. Default: []. | UIAwesome\ |
$suffixTag protected | false|UnitEnum | Tag name for the suffix element, or false to disable. Default: false. | UIAwesome\ |
$template protected | string | Template string used for constructing the HTML tag. Default: ''. | UIAwesome\ |
Methods
Section titled “Methods”Method details
Section titled “Method details”autocomplete()
Section titled “autocomplete() ”public function autocomplete(string|Stringable|UnitEnum|null $value): staticSets the autocomplete attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | string|Stringable|UnitEnum| | Autocomplete value, or null to remove the attribute. |
Returns
static: New instance with the updated autocomplete attribute.
list()
Section titled “list() ”public function list(string|Stringable|UnitEnum|null $value): staticSets the list attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | string|Stringable|UnitEnum| | Datalist ID, or null to remove the attribute. |
Returns
static: New instance with the updated list attribute.
max()
Section titled “max() ”public function max(float|int|string|Stringable|UnitEnum|null $value): staticSets the max attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | float|Stringable|UnitEnum| | Maximum value, or null to remove the attribute. |
Returns
static: New instance with the updated max attribute.
min()
Section titled “min() ”public function min(float|int|string|Stringable|UnitEnum|null $value): staticSets the min attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | float|Stringable|UnitEnum| | Minimum value, or null to remove the attribute. |
Returns
static: New instance with the updated min attribute.
readonly()
Section titled “readonly() ”public function readonly(bool|null $value): staticSets the readonly attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | bool| | Readonly state. Use true to make readonly, false to make editable, or null to remove the attribute. |
Returns
static: New instance with the updated readonly attribute.
required()
Section titled “required() ”public function required(bool|null $value): staticSets the required attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | bool| | Required state. Use true to require a value, false to make it optional, or null to remove the attribute. |
Returns
static: New instance with the updated required attribute.
step()
Section titled “step() ”public function step(float|int|string|Stringable|UnitEnum|null $value): staticSets the step attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | float|Stringable|UnitEnum| | Step value. Use any for no stepping restriction, or null to remove the attribute. |
Returns
static: New instance with the updated step attribute.
getTag()
Section titled “getTag() ”protected function getTag(): UIAwesome\Html\Interop\VoidsReturns the tag enumeration for the <input> element.
Returns
Voids: Tag enumeration instance for <input>.
getType()
Section titled “getType() ”abstract protected function getType(): UIAwesome\Html\Attribute\Values\TypeReturns the type rendered as the default type attribute.
Returns
UIAwesome\Html\Attribute\Values\Type: Type enumeration case for the control.
loadDefault()
Section titled “loadDefault() ”protected function loadDefault(): array<string, mixed>Returns the default configuration for the input element.
Returns
array<string, mixed>: Default configuration for the input element, including the default type attribute returned by getType().
run()
Section titled “run() ”protected function run(): stringRenders the <input> element with its attributes.
Returns
string: Rendered HTML for the <input> element.