Date and time
Purpose: storing date values with and without time
Field type in SQL table: date, datetime
Additional parameters:
now_on_create
Purpose: in the admin panel, when creating a record, initially puts the current date in the field
Possible values: true, false
Default: true
display_selects
Purpose: when filling in, display the field as 3 select tags (day, month, year) in forms in templates
Possible values: true, false
Default: false
years (only for date type)
Purpose: when displayed with the display_selects option, sets the range of the list of years
Possible values: years separated by commas in the form '1998,2005'
Default: 1920 to today
Examples:
['Date', 'date', 'date']
['Date and Time', 'date_time', 'registrer_date', ['required' => true]]
['Birth Date', 'date', 'birth_date', ['display_selects' => true, 'years' => '1998,2005']]
Previous section
Text