This widget is built around the jQuery UI datepicker, it requires the date type or a subclass thereof.
Available configuration options:
- boolean show_time: Boolean that controls, if the stored value is to be shown with or without
the time-of-day. If omitted, 00:00:00 is assumed. Defaults to true.
- int minyear: Minimum Year available for selection, default see below.
- int maxyear: Maximum Year available for selection, default see below.
Default values for min/maxyear
If unspecified, it defaults to the 0-9999 range unless the base date type uses
the UNIXDATE storage mode, in which case 1970-2030 will be used instead.
Methods
_create_initscript ()
Generates the initscript for the current field.
Returns
string
The init script.
_on_configuring ()
Adapts the min/maxyear defaults if the base date is set to UNIXDATE storage.
_on_initialize ()
Validates the base type.
add_head_elements ()
Adds the external HTML dependencies, both JS and CSS.
Static
A static flag prevents
multiple insertions of these dependencies.
freeze ()
Freeze the entire group, special handling applies, the formgroup is replaced by a single
static element.
get_default ()
The default call produces a simple text representation of the current date.
todo |
do we really need to set this->format here? |
render_content ()
Renders the date in the ISO format.
unfreeze ()
Unfreeze the entire group, special handling applies, the formgroup is replaced by a the
full input widget set.
_create_elements (boolean $frozen)
Create the unfrozen element listing.
Parameters
$frozen
boolean
Should the elements be frozen or not
Properties
boolean $hide_seconds
Indicates whether the timestamp should include seconds or not.
int $maxyear
Maximum Year available for selection.
int $minyear
Minimum Year available for selection.
String $showOn
When should the calendar be shown (possible values: button, focus, both)
boolean $show_time
Indicates whether the timestamp should be shown or not.