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.

setValue(mixed $value)

No description

mixed
getValue()

No description

void
loadHttpData()

Loads HTTP data.

Html|string
getControl()

Generates control's HTML element.

string
formatHtmlValue(DateTimeInterface|string|int $value)

Formats a date/time for HTML attributes.

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

Parameters

$label
int $type
bool $withSeconds

at line 54
DateTimeControl setFormat(string $format)

Format of returned value. Allowed values are string (ie 'Y-m-d'), DateTimeControl::FormatObject and DateTimeControl::FormatTimestamp.

Parameters

string $format

Return Value

DateTimeControl

at line 65
Control setValue(mixed $value)

No description

Parameters

mixed $value

Return Value

Control

at line 77
mixed getValue()

No description

Return Value

mixed

at line 117
void loadHttpData()

Loads HTTP data.

Return Value

void

at line 127
Html|string getControl()

Generates control's HTML element.

Return Value

Html|string

at line 140
string formatHtmlValue(DateTimeInterface|string|int $value)

Formats a date/time for HTML attributes.

Parameters

DateTimeInterface|string|int $value

Return Value

string

at line 155
string formatLocaleText(DateTimeInterface|string|int $value)

Formats a date/time according to the locale and formatting options.

Parameters

DateTimeInterface|string|int $value

Return Value

string

at line 193
bool validateMinMax($min, $max)

No description

Parameters

$min
$max

Return Value

bool