DateTimeInput
class DateTimeInput extends TextInput
Class DateTimeInput. Textual datetime input.
Traits
Constants
DEFAULT_FORMAT |
|
Properties
string | $placeholder | HTML placeholder | from TextInput |
bool | $autocomplete | from TextInput | |
string | $invalidFormatMessage | This errorMessage is added for invalid format | |
string | $format | expected PHP format for datetime |
Methods
Modify control in such a way that it explicitly shows its validation state.
No description
Gets the state of autocomplete: true=on,false=off,null=omit attribute
No description
No description
No description
No description
Input accepted format.
Turns datetime format into a placeholder, e.g. 'd.m.Y' => 'dd.mm.yyyy'.
Details
in
StandardValidationTrait
at line 28
Html
showValidation(
Html
$control)
Modify control in such a way that it explicitly shows its validation state.
Returns the modified element.
at line 43
__construct($label = NULL, $maxLength = NULL)
in
TextInput
at line 55
bool|null
getAutocomplete($bool)
Gets the state of autocomplete: true=on,false=off,null=omit attribute
in
TextInput
at line 65
IAutocompleteInput
setAutocomplete(bool|null $bool)
Turns autocomplete on or off.
in
TextInput
at line 78
getControl()
in
TextInput
at line 98
string
getPlaceholder()
at line 60
cleanErrors()
at line 68
getValue()
at line 87
DateTimeInput
setValue(DateTime
|null $value)
at line 113
validate()
at line 123
string
getFormat()
at line 135
DateTimeInput
setFormat(string $format, null|string $placeholder = NULL)
Input accepted format.
Default is d.m.yyyy h:mm
at line 157
static string
makeFormatPlaceholder(string $format, bool $example = TRUE, bool
$appendExample = TRUE)
Turns datetime format into a placeholder, e.g. 'd.m.Y' => 'dd.mm.yyyy'.
Supported values: d, j, m, n, Y, y, a, A, g, G, h, H, i, s, c, U