Commit a8c5d614 authored by Peter Droogmans's avatar Peter Droogmans
Browse files

date_popup_date_format needs date_popup module

parent e4bf0034
......@@ -201,8 +201,10 @@ function clientside_validation_regular($form_id, $element, &$js_rules, $form_sta
$date_title = ($element['#type'] == 'date_popup') ? $element['date']['#title'] : $element['#date_title'];
if (isset($element['date'])) {
_clientside_validation_set_required($element['date']['#name'], $date_title, isset($element['#required']) ? $element['#required'] : FALSE, $js_rules);
$format = date_popup_date_format($element);
_clientside_validation_set_date($element['date']['#name'], $date_title, $format, $js_rules);
if (module_exists('date_popup')) {
$format = date_popup_date_format($element);
_clientside_validation_set_date($element['date']['#name'], $date_title, $format, $js_rules);
}
}
if (isset($element['time']) && isset($element['time']['#name'])) {
_clientside_validation_set_required($element['time']['#name'], $element['time']['#title'], isset($element['#required']) ? $element['#required'] : FALSE, $js_rules);
......
Supports Markdown
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