Date format changes after Validation Message
On selecting a future date, the value displays in the DD/MM/YYYY format. However, IsPastDate client validation displays an error message and the format changes to MM/DD/YYYY.
Steps to Reproduce
Select a future date.
This behavior is as per Pega product design.
Here’s the explanation for the reported behavior:
The Date format is dependent on the Locale settings. The Locale settings are derived from the system where the user is accessing the settings or is based on the Locale settings in the Operator ID. The Locale setting in the Operator ID always takes precedence.
If the locale is set as en_IN in the Operator record, then the format is DD/mm/yyyy and MM/dd/yyyy for en_US.
Similarly, the Date formats change according to the locale specified in the operator record. Different Date formats can be specified in the Date control in the Presentation tab. However, these styles are applicable only when the Date is in the read-only mode (that is, the date is valid or the focus is not on the Date field).
If the date is invalid according to the Validation logic, the error displays on the Date field in the UI and the Date field changes to the Editable mode. The read-only formats are not applicable in the Editable mode.
0% found this useful