From: deb.monish Date: Fri, 8 Apr 2016 06:36:49 +0000 (+0530) Subject: CRM-18349: Custom date field default value not set on 'On Behalf of' Profiles X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5942e66f3d56b048f2a08f6986854c6546ebc1fa;p=civicrm-core.git CRM-18349: Custom date field default value not set on 'On Behalf of' Profiles --- 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;