Support Article
Issue with Datetime control with readonly expression
SA-27843
Summary
Developer has configured a master section containing two sub-sections(A & B). In both the section, there is one checkbox and one datetime control.
Both Checkbox and DateTime controls has been configured with on change-refresh section. The DateTime control has a readonly expression configured (on checkbox value) and custom format for both read-only and editable mode.
During run-time, when user selects the checkbox, DateTime control becomes editable.
After selecting any value on this DateTime control, its section gets refreshed. However, if we select a new date again, its showing some JS code snippet in DateTime control field.
Error Messages
Not Applicable
Steps to Reproduce
1. Create a master section containing two sub-sections(A & B).
2. In both the section, there is one checkbox and one datetime control.
3. Both Checkbox and DateTime controls has been configured with on change-refresh section.
4. The DateTime control has a readonly expression configured (on checkbox value) and custom format for both read-only and editable mode.
5. During run-time, select the checkbox, DateTime control becomes editable.
6. After selecting any value on this DateTime control, its section gets refreshed. However, if a new date is selected again, it shows some JS code snippet in DateTime control field.
Root Cause
A defect in Pegasystems’ code or rules: Issue is due to missed usecase of "display readonly formatting" feature.
If user configures some readonly condition on the control, user is getting the editable control in the response instead of readonly. This has to be corrected by making isEditable variable to false in case if the reload cell request is for readonly formatting.
Resolution
Apply HFix-29033.
Published September 15, 2016 - 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.