fix datepickers to show correct minDate
authorJon Goldberg <jon@megaphonetech.com>
Fri, 18 Sep 2020 20:21:22 +0000 (16:21 -0400)
committerJon Goldberg <jon@megaphonetech.com>
Fri, 18 Sep 2020 21:51:16 +0000 (17:51 -0400)
CRM/Admin/Form/Job.php
CRM/Member/Form/Membership.php
CRM/SMS/Form/Schedule.php

index 0f69059f7b3ec90eefc86173ac50b318b416f661..65bb09710e2ab6b2609258c8bada34cbe870435a 100644 (file)
@@ -97,7 +97,7 @@ class CRM_Admin_Form_Job extends CRM_Admin_Form {
     $this->add('select', 'run_frequency', ts('Run frequency'), CRM_Core_SelectValues::getJobFrequency());
 
     // CRM-17686
-    $this->add('datepicker', 'scheduled_run_date', ts('Scheduled Run Date'), NULL, FALSE, ['minDate' => time()]);
+    $this->add('datepicker', 'scheduled_run_date', ts('Scheduled Run Date'), NULL, FALSE, ['minDate' => date('Y-m-d')]);
 
     $this->add('textarea', 'parameters', ts('Command parameters'),
       "cols=50 rows=6"
index 3c98b8570b9f71cd919120ca3ef7c79fc3e5421c..14c2f28caaf83ff4efa801705f0594e1a4a6f043 100644 (file)
@@ -570,7 +570,7 @@ class CRM_Member_Form_Membership extends CRM_Member_Form {
         CRM_Member_StatusOverrideTypes::getSelectOptions()
       );
 
-      $this->add('datepicker', 'status_override_end_date', ts('Status Override End Date'), '', FALSE, ['minDate' => time(), 'time' => FALSE]);
+      $this->add('datepicker', 'status_override_end_date', ts('Status Override End Date'), '', FALSE, ['minDate' => date('Y-m-d'), 'time' => FALSE]);
 
       $this->addElement('checkbox', 'record_contribution', ts('Record Membership Payment?'));
 
index 3de19681be32beaffb1605d379f769979b4d25c7..04d68bda9f85001b7542fa0b8551d0a43a8383ee 100644 (file)
@@ -60,7 +60,7 @@ class CRM_SMS_Form_Schedule extends CRM_Core_Form {
       'send_later' => ['id' => 'send_later'],
     ]);
 
-    $this->add('datepicker', 'start_date', '', NULL, FALSE, ['minDate' => time()]);
+    $this->add('datepicker', 'start_date', '', NULL, FALSE, ['minDate' => date('Y-m-d')]);
 
     $this->addFormRule(['CRM_SMS_Form_Schedule', 'formRule'], $this);