DateTimeControl
class DateTimeControl extends BaseControl
Selects date or time or date & time.
Constants
TypeDate |
|
TypeTime |
|
TypeDateTime |
|
FormatObject |
|
FormatTimestamp |
|
Methods
No description
Format of returned value. Allowed values are string (ie 'Y-m-d'), DateTimeControl::FormatObject and DateTimeControl::FormatTimestamp.
Returns control's value.
Loads HTTP data.
Generates control's HTML element.
Formats a date/time for HTML attributes.
Formats a date/time according to the locale and formatting options.
No description
Details
at line 36
__construct(string|Stringable|null $label = null, int $type = self::TypeDate, bool $withSeconds = false)
No description
at line 52
DateTimeControl
setFormat(string $format)
Format of returned value. Allowed values are string (ie 'Y-m-d'), DateTimeControl::FormatObject and DateTimeControl::FormatTimestamp.
at line 62
Control
setValue(mixed $value)
No description
at line 71
mixed
getValue()
Returns control's value.
at line 102
void
loadHttpData()
Loads HTTP data.
at line 112
Html|string
getControl()
Generates control's HTML element.
at line 127
string
formatHtmlValue(DateTimeInterface|string|int $value)
Formats a date/time for HTML attributes.
at line 140
string
formatLocaleText(DateTimeInterface|string|int $value)
Formats a date/time according to the locale and formatting options.
at line 173
bool
validateMinMax(mixed $min, mixed $max)
No description