Skip to content
Snippets Groups Projects
Commit e6b37abd authored by Jacob Rockowitz's avatar Jacob Rockowitz Committed by Liam Morland
Browse files

Issue #3366615 by jrockowitz: Check for webform_jqueryui_datepicker before using it

parent fa56045d
Branches
Tags
1 merge request!138Issue #3257570: Ensure that submission are deleted when a webform is deleted
Pipeline #26789 passed with warnings
......@@ -47,8 +47,10 @@ class Date extends DateBase {
* {@inheritdoc}
*/
public function prepare(array &$element, WebformSubmissionInterface $webform_submission = NULL) {
// Unset custom date format which is only used by datepicker.
if (isset($element['#date_date_format']) && !isset($element['#datepicker'])) {
// Unset custom date format which is only used by the
// webform_jqueryui_datepicker.module.
$has_datepicker = isset($element['#datepicker']) && $this->moduleHandler->moduleExists('webform_jqueryui_datepicker');
if (isset($element['#date_date_format']) && !$has_datepicker) {
unset($element['#date_date_format']);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment