create activity - always consider activity_date_time changed value
authorunknown <priyanka.karan26@gmail.com>
Fri, 7 Nov 2014 14:01:22 +0000 (14:01 +0000)
committerunknown <priyanka.karan26@gmail.com>
Fri, 7 Nov 2014 14:01:22 +0000 (14:01 +0000)
CRM/Core/BAO/RecurringEntity.php
templates/CRM/Activity/Form/Activity.tpl

index 9c4586f5a7eda3d74249724272bad49ac73312e5..ccf003e6a4878548c9293adeaec7362a4d5e87b9 100644 (file)
@@ -820,7 +820,12 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
     }\r
 \r
     if (CRM_Utils_Array::value('repetition_start_date', $formParams)) {\r
-      $repetitionStartDate = $formParams['repetition_start_date'];\r
+      if (CRM_Utils_Array::value('repetition_start_date_display', $formParams)) {\r
+        $repetitionStartDate = $formParams['repetition_start_date_display'];\r
+      }\r
+      else {\r
+        $repetitionStartDate = $formParams['repetition_start_date'];\r
+      }\r
       if (CRM_Utils_Array::value('repetition_start_date_time', $formParams)) {\r
         $repetitionStartDate = $repetitionStartDate . " " . $formParams['repetition_start_date_time'];\r
       }\r
index 0f8997319512be2f6aa68f31e7cb6e3a063e2236..0d29c0571920be09cba7079b13786f0e8082871a 100644 (file)
                 $('#repetition_start_date, #repetition_start_date_display').val($('#activity_date_time').val());
                 $('#repetition_start_date_time').val($('#activity_date_time_time').val());
               }
-              $('#activity_date_time_display').blur(function() {
-                $('#repetition_start_date, #repetition_start_date_display').val($('#activity_date_time').val());
+
+              $('#activity_date_time_display').change(function() {
+                $('#repetition_start_date_display').val($('#activity_date_time').val());
+              });
+
+              $('#activity_date_time_time').change(function() {
                 $('#repetition_start_date_time').val($('#activity_date_time_time').val());
               });
+
               if ($('#start_action_offset').val() == "" && $('#repeat_absolute_date_display').val() == "") {
                 $('#recurring-entity-block').addClass('collapsed');
               }