From 5942e66f3d56b048f2a08f6986854c6546ebc1fa Mon Sep 17 00:00:00 2001 From: "deb.monish" Date: Fri, 8 Apr 2016 12:06:49 +0530 Subject: [PATCH] CRM-18349: Custom date field default value not set on 'On Behalf of' Profiles --- CRM/Core/Page/AJAX/Location.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Core/Page/AJAX/Location.php b/CRM/Core/Page/AJAX/Location.php index 403f1c4e91..4d128c1228 100644 --- a/CRM/Core/Page/AJAX/Location.php +++ b/CRM/Core/Page/AJAX/Location.php @@ -180,8 +180,8 @@ class CRM_Core_Page_AJAX_Location { } elseif ($htmlType == 'Select Date') { $elements["onbehalf_{$key}"]['type'] = $htmlType; - $elements["onbehalf_{$key}"]['value'] = $defaults[$key]; - $elements["onbehalf_{$key}_display"]['value'] = $defaults[$key]; + //CRM-18349, date value must be ISO formatted before being set as a default value for crmDatepicker custom field + $elements["onbehalf_{$key}"]['value'] = CRM_Utils_Date::processDate($defaults[$key], NULL, FALSE, 'Y-m-d G:i:s'); } else { $elements["onbehalf_{$key}"]['type'] = $htmlType; -- 2.25.1