"date" and "date_time"
Purpose: storage of date with or without time
Field type in SQL table: "date", "datetime", "varchar" ("timestamp" isn't used)
Additional parameters
"now_on_create"
Purpose: when creating a record in admin panel sets the current date (and time) as an initial field value
Possible values: "true", "false"
By default: "true"
"display_selects"
Purpose: when filling the field display it as 3 "select" tags (day, month, year) in forms of templates (on frontend)
Possible values: "true", "false"
By default: "false"
"years" (only for "date" datatype)
Purpose: when displaying with the option "display_selects", sets an interval of the list of years
Possible values: the years separated by a comma in the form of "1998,2005"
By default: since 1920 to present year
Samples
array("Date", "date", "date") array("Date and time", "date_time", "registrer_date", array("required" => true)) array("Birthdate", "date", "birth_date", array("display_selects" => true, "years" => "1998,2005"))
Previous section
"text"