CRM-18487 - max date should be the last date of the year
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Mon, 2 May 2016 09:02:33 +0000 (14:32 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Mon, 2 May 2016 09:02:33 +0000 (14:32 +0530)
CRM/Core/BAO/CustomField.php

index f91e8cc9e2278e19aa14b6f5e701d08329fa8198..c72788e329c8210f05bd947b793aff324d32a19b 100644 (file)
@@ -905,7 +905,8 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
         $params = array(
           'date' => $field->date_format,
           'minDate' => isset($minYear) ? $minYear . '-01-01' : NULL,
-          'maxDate' => isset($maxYear) ? $maxYear . '-01-01' : NULL,
+          //CRM-18487 - max date should be the last date of the year.
+          'maxDate' => isset($maxYear) ? $maxYear . '-12-31' : NULL,
           'time' => $field->time_format ? $field->time_format * 12 : FALSE,
           'yearRange' => "{$minYear}:{$maxYear}",
         );