From 0214f74ecfdd430edd405f0cd81aafa7fa71b7e4 Mon Sep 17 00:00:00 2001 From: Francis Whittle Date: Fri, 15 Dec 2023 09:43:27 +1100 Subject: [PATCH] CIVIEWAY-263 Revert the datepicker in 'eWAYRecurring.php' from add('datepicker') to addDateTime() --- eWAYRecurring.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/eWAYRecurring.php b/eWAYRecurring.php index 0559cb5..a08b87c 100644 --- a/eWAYRecurring.php +++ b/eWAYRecurring.php @@ -182,7 +182,8 @@ function ewayrecurring_civicrm_buildForm($formName, &$form) { ($crid = $form->getVar('contributionRecurID')) || ($crid = $form->getVar('_crid')); if ($crid) { $sql = 'SELECT next_sched_contribution_date FROM civicrm_contribution_recur WHERE id = %1'; - $form->add('datepicker', 'next_scheduled_date', ts('Next Scheduled Date'), NULL, FALSE, ['formatType' => 'activityDateTime']); + // TODO Replace this with $form->add('datepicker'). Attempts to do this so far have resulted in a widget that does not open on click. + $form->addDateTime('next_scheduled_date', ts('Next Scheduled Date'), FALSE, ['formatType' => 'activityDateTime']); if ($default_nsd = CRM_Core_DAO::singleValueQuery($sql, [ 1 => [ $crid, @@ -206,8 +207,8 @@ function ewayrecurring_civicrm_buildForm($formName, &$form) { json_encode([ 'next_scheduled_date' => $template['next_scheduled_date'], 'date_picker' => $datePicker, - ]) . - ");"); + ]) . ");" + ); } } }