- Issue created by @pakmanlh
The module page documentation shows an example with some small mistakes on it.
The example should use DateRangePickerOptions
and all the children parameters should use syntax.
$element['range'] = [
'#type' => 'daterangepicker',
'#DateRangePickerOptions' => [
'initial_text' => t('Select date range...'),
'apply_button_text' => t('Apply'),
'clear_button_text' => t('Clear'),
'cancel_button_text' => t('Cancel'),
'range_splitter' => ' - ',
'date_format' => 'd M, yy',
// This needs to be a format recognised by javascript Date.parse method.
'alt_format' => 'yy-mm-dd',
'date_picker_options' => [
'number_of_months' => 2,
],
],
];
Active
1.0
Documentation