Summary:
An issue may arise when users have the "Use AM/PM" option set to Yes, and save a time value with no space between the time and the AM/PM part.
Symptoms:
As an example, if a user were to save the time an opportunity were opened as "12:00PM" (as distinct from "12:00 PM"), the time value will not be saved.
Cause:
The issue is caused by a failure to evaluate the time data correctly, when it would be considered to be valid by a user.
Resolution:
This issue has been resolved via a code change within Sage CRM, and is available in the 7.3c hotfix 2 release. 7.3c hotfix 2 is currently scheduled for release on the 9th of October 2015.
Workaround:
A workaround is available for earlier versions of Sage CRM, and is reasonably straightforward. It will apply to all input fields with an ID ending with "_TIME". Please bear in mind that this may cause issues with custom fields, for example if a custom field exists named myentity_time. No standard fields in CRM will be inadvertently affected by this script.
crm.ready(function () {
$("input[id$='_TIME']").keyup(function () {
if (CurrentUser.userpref_useampm == 'Y') {
console.log("doing workaround. User using AMPM");
var dateFormatRegEx = /([0-9]{1,2}\:[0-9]{2})(\w+)/g;
var tempTimeValue = $(this).val();
if (dateFormatRegEx.exec(tempTimeValue)) {
tempTimeValue = RegExp.$1 + " " + RegExp.$2;
$(this).val(tempTimeValue);
}
}
});
});
The easiest way to apply this is by adding it as a custom JS file to \CRM\WWWRoot\js\custom.
Status:
The issue has been resolved by the development team.