| Methods |
public
|
setOption(string $name, mixed $value): void
Set Flatpickr option.
|
#
|
protected
|
init(): void
Called when view becomes part of render tree. You can override it but avoid
placing any "heavy processing" here.
Called when view becomes part of render tree. You can override it but avoid
placing any "heavy processing" here.
Overrides
|
#
|
protected
|
renderView(): void
View-specific rendering stuff. Feel free to replace this method with
your own. View::renderView contains some logic…
View-specific rendering stuff. Feel free to replace this method with
your own. View::renderView contains some logic that integrates with
Fomantic-UI.
Overrides
|
#
|
public
|
onChange(JsExpressionable $expr, $default = []): void
Shorthand method for on('change') event.
Some input fields, like Calendar, could call this differently.
Shorthand method for on('change') event.
Some input fields, like Calendar, could call this differently.
If $expr is JsExpressionable, then it will execute it instantly.
If $expr is callback method, then it'll make additional request to webserver.
Examples:
$control->onChange(new JsExpression('console.log('changed')'));
$control->onChange(new JsExpression('$(this).parents('.form').form('submit')'));
Overrides
|
#
|
public
|
getJsInstance(): JsChain
Get the FlatPickr instance of this input in order to
get it's properties like selectedDates or run it's methods.
Ex:…
Get the FlatPickr instance of this input in order to
get it's properties like selectedDates or run it's methods.
Ex: clearing date via JS
$button->on('click', $f->getControl('date')->getJsInstance()->clear());.
|
#
|
private
|
expandPhpDtFormat(string $phpFormat): string
|
#
|
public
|
convertPhpDtFormatToFlatpickr(string $phpFormat, bool $enforceSeconds): string
|
#
|
public
|
isDtFormatWith24hrTime(string $phpFormat): bool
|
#
|
public
|
isDtFormatWithSeconds(string $phpFormat): bool
|
#
|
public
|
isDtFormatWithMicroseconds(string $phpFormat): bool
|
#
|