afe_daterange_picker
Use dangrossman/bootstrap-daterangepicker as GUI wrapper for two DateType fields (start date and end date).
type: integer|string
, default: AvocodeFormExtensions
Translation domain for DateRange Picker messages.
type: boolean
, default: false
If true Avocode\FormExtensionsBundle\Form\Model\DateRange object will be used as data, otherwise string is used.
type: string
, default: right
Open the widget on the left
or right
.
type: string
, default: -
Separator used between the two dates.
type: boolean
, default: true
Show the week numbers.
type: boolean
, default: false
Show dropdowns for the months and year.
type: boolean|string
, default: false
String value representing the earliest date that may be selected, all earlier dates will
be disabled. The string should be in a format dd/mm/yyyy
.
type: boolean|string
, default: false
String value representing the latest date that may be selected, all later dates will
be disabled. The string should be in a format dd/mm/yyyy
.
type: boolean|array
, default: false
Date limit: false or array('days'=>5)
type: null|array
, default: null
You can use predefined ranges:
today
,yesterday
,last-week
,last-month
,last-year
$builder->add('demo', 'daterange_picker', array(
'ranges' => array('today', 'yesterday')
);
Or define your own:
$builder->add('demo', 'afe_daterange_picker', array(
'ranges' => array(
'My custom range' => array('2013-01-01', '2013-04-01'),
'My custom range2' => array('2012-09-01', '2013-02-01'),
),
);