Support Article
DateTime field with calendar displays as a blank
SA-93861
Summary
On selecting a date from the UI, the date displays as a blank intermittently. This occurs on converting the date from ‘dd/MM/yyyy’ to ‘dd-MMM-yyyy’ readonly format and allowing text entry.
Error Messages
Not Applicable
Steps to Reproduce
- Launch the application
- Configure multiple Date fields.
- Select dates quickly for these fields.
Root Cause
A defect in Pegasystems’ code or rules.
The date is blank due to the missing 'Display readonly formatting' feature. When readonly conditions are configured on the control, editable control displays in the response instead of readonly.
This must be corrected by setting the isEditable variable to false if the Reload cell request is for readonly formatting. For a control that is always 'Editable', the 'Display value using readonly formatting' checkbox must be hidden.
Resolution
Perform the following local-change:
- Change the pzGenerateControl Rule Utility Function (RUF) to set isEditable to false when getReadonlyFormat is true.
- Compile and generate the pzGenerateControl RUF and save the section that is configured with the DateTime control logoff and login.
- Apply HFix-30664 which includes the above changes.
- Remove the explicit Post Value action configured on the Date fields.
- Remove the Refresh other Action on the Date field where Refresh other Section is configured.
- Add the below script in the UserWorkform HTML fragment.
<script>
function customRefresh(sectionName) {
setTimeout( function() {
pega.control.UIElement.Actions.refresh("otherSection", sectionName ,undefined, ""); }
, 1500);
}
</script>
- Add the RunScript action to invoke the script included in the UserWorkForm.
Published March 27, 2020 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.