Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Unable to localize the "Clear" button in the Date Range Control

SA-103748

Summary



Unable to localize the Clear button to  Swedish in the Date range control. However, the Apply button is localized by creating a pyCaption.Apply.


Error Messages



Not Applicable


Steps to Reproduce

  1. Create a View using a Date range.
  2. Create translated Field Values, 'pyCaption.Apply' as 'Bekräfta' and 'pyCaption.Clear' as 'Rensa', in a higher ruleset in the application (in this use case, the Language ruleset) in the @baseclass. The Date Range control displays the Apply button translated correctly to the new value. However, the Clear button is not localized.


Root Cause



A defect in Pegasystems’ code or rules.

All the locale translations for the DateTime control are loaded from the pzpega_ui_calendar_util JavaScript rule. In this file, translation exists for Apply (APPLY_TEXT) and Close (CLOSE_TEXT) buttons, but not for the Clear (CLEAR_TEXT) button. Hence, even when a field value for Clear is created, it is not fetched at runtime.
The Date Range control retrieves all translations present in the pzpega_ui_calendar_util rule from the pzpega_ui_daterangepicker JavaScript rule. In this rule, the references to load the translation for Clear text is referred as CLEAR_TEXT. As this is not present in the translation, the value becomes undefined and loads Clear as text at runtime.
Hence, the change is either to update the rule with CLEAR_TEXT translation value pzpega_ui_calendar_util rule or change the references of CLEAR_TEXT to CLOSE_TEXT in pzpega_ui_daterangepicker.



Resolution



This feature is implemented in Pega Platform 8.3.2.

Published March 25, 2020 - Updated December 2, 2021

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us