Backend\FormWidgets\DatePicker

Overview

DatePicker renders a date picker field

Extends

Public Properties

public bool $mode

mode for display. Values: datetime, date, time

public string $format

format provides an explicit date display format

public string $minDate

minDate the minimum/earliest date that can be selected. eg: 2000-01-01

public string $maxDate

maxDate the maximum/latest date that can be selected. eg: 2020-12-31

public string $yearRange

yearRange number of years either side or array of upper/lower range eg: 10 or [1900,1999]

public string|array $disableDays

disableDays are days that cannot be selected. Value can be a number to represent Sunday (0) to Saturday (6), or an explicit date (2024-10-01).

public int $firstDay

firstDay of the week eg: 0 (Sunday), 1 (Monday), 2 (Tuesday), etc.

public bool $twelveHour

twelveHour clock

public bool $showWeekNumber

showWeekNumber at head of row

public bool $useTimezone

useTimezone will convert the date and time to the user preference

public bool $defaultTimeMidnight

defaultTimeMidnight If the time picker is enabled but the time value is not provided fallback to 00:00. If this option is disabled, the default time is the current time.

Show inherited public properties

Inherited Public Properties

Protected Properties

protected $defaultAlias

defaultAlias to identify this widget.

Show inherited protected properties

Inherited Protected Properties


Public Methods

public getSaveValue()

public getSaveValue($value): void

getSaveValue processes the postback value for this widget. If the value is omitted from postback data, the form widget will be skipped.

public init()

public init(): void

init the widget, called by the constructor and free from its parameters.

public prepareVars()

public prepareVars(): void

prepareVars for display

public render()

public render(): void

render the widget's primary contents.

public resetFormValue()

public resetFormValue(): void

resetFormValue from the form field

Show inherited public methods

Inherited Public Methods

Protected Methods

protected getDateFormatAlias()

protected getDateFormatAlias(): void

protected getDateFormatMoment()

protected getDateFormatMoment(): void

getDateFormatMoment converts PHP format to JS format

Show inherited protected methods

Inherited Protected Methods