Commit c496ee5c authored by Martin Keereman's avatar Martin Keereman
Browse files

Issue #3157747 by amykhailova, mrinalini9: Date filter outputs notice when...

Issue #3157747 by amykhailova, mrinalini9: Date filter outputs notice when jQuery option is selected
parent 41dc247e
......@@ -56,12 +56,15 @@ class DatePickers extends FilterWidgetBase {
if (isset($form[$field_id]['value'])) {
$format = $form[$field_id]['value']['#date_format'];
$form[$field_id]['value']['#attributes']['class'][] = 'bef-datepicker';
$form[$field_id]['value']['#attributes']['type'] = 'date';
}
else {
// Both min and max share the same format.
$format = $form[$field_id]['min']['#date_format'];
$form[$field_id]['min']['#attributes']['class'][] = 'bef-datepicker';
$form[$field_id]['max']['#attributes']['class'][] = 'bef-datepicker';
$form[$field_id]['min']['#attributes']['type'] = 'date';
$form[$field_id]['max']['#attributes']['type'] = 'date';
}
// Convert Date API format to jQuery UI date format.
......@@ -80,11 +83,13 @@ class DatePickers extends FilterWidgetBase {
foreach ($fields as $field) {
if (isset($form[$field_id][$field])) {
$form[$field_id][$field]['#attributes']['class'][] = 'bef-datepicker';
$form[$field_id][$field]['#attributes']['type'] = 'date';
}
}
}
else {
$form[$field_id]['#attributes']['class'][] = 'bef-datepicker';
$form[$field_id]['#attributes']['type'] = 'date';
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment