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