\BootstrapDropdownDateField
BootstrapDropdownDateField Form field to display an editable date string in three separate dropdown fields for day, month and year.
# Configuration
- 'range': set the range of the Year Drowpdown
- 'dateformat' (string): Date format compatible with Zend_Date.
Usually set to default format for through .
- 'datavalueformat' (string): Internal ISO format string used by to save the
date to a database.
- 'min' (string): Minimum allowed date value (in ISO format, or strtotime() compatible).
Example: '2010-03-31', or '-7 days'
- 'max' (string): Maximum allowed date value (in ISO format, or strtotime() compatible).
Example: '2010-03-31', or '1 year'
# Localization
The field will get its default locale from , and set the `dateformat`
configuration accordingly. Changing the locale through will not update the
`dateformat` configuration automatically.
See http://doc.silverstripe.org/framework/en/topics/i18n for more information about localizing form fields.
# Usage
## Example: German dates with separate fields for day, month, year
$f = new DropdownDateField('MyDate');
$f->setLocale('de_DE');
# Validation
Caution: JavaScript validation is only supported for the 'en_NZ' locale at the moment,
it will be disabled automatically for all other locales.
Synopsis
Hierarchy
Extends
- DropdownDateField