get('InputfieldDatetime'); * $f->attr('name', 'test_date'); * $f->label = 'Test date'; * $f->val(time()); // value is get or set a UNIX timestamp * * // date input with jQuery UI datepicker on focus * $f->inputType = 'text'; // not necessary as this is the default * $f->datepicker = InputfieldDatetime::datepickerFocus; * * // date selects * $f->inputType = 'select'; * $f->dateSelectFormat = 'mdy'; // month abbr (i.e. 'Sep'), day, year * $f->dateSelectFormat = 'Mdy'; // month full (i.e. 'September'), day, year * $f->yearFrom = 2019; // optional year range from * $f->yearTo = 2024; // optional year range to * * // HTML5 date, time or date+time inputs * $f->inputType = 'html'; * $f->htmlType = 'date'; // or 'time' or 'datetime' * ~~~~~~ * * @property int $value This Inputfield keeps the value in UNIX timestamp format (int). * @property string $inputType Input type to use, one of: "text", "select" or "html" (when html type is used, also specify $htmlType). * @property int|bool $defaultToday When no value is present, default to today’s date/time? * @property int $subYear Substitute year when month+day or time only selections are made (default=2010) * @property int $subDay Substitute day when month+year or time only selectinos are made (default=8) * @property int $subMonth Substitute month when time-only selections are made (default=4) * @property int $subHour Substitute hour when date-only selections are made (default=0) * @property int $subMinute Substitute minute when date-only selection are made (default=0) * @property bool|int $requiredAttr When combined with "required" option, this also makes it use the HTML5 "required" attribute (default=false). * * Properties specific to "text" input type (with optional jQuery UI datepicker) * ============================================================================= * @property int $datepicker jQuery UI datepicker type (see `datepicker*` constants) * @property string $yearRange Selectable year range in the format `-30:+20` where -30 is number of years before now and +20 is number of years after now. * @property int $timeInputSelect jQuery UI timeSelect type (requires datepicker)—specify 1 to use a `