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

Date field changes by minus 1 day Automatically

SA-25741

Summary



A section is built based on a page, there is a date field on this page referenced with pxDateTime control.

At runtime, when a date value is selected from the control, it is stored in clipboard as Text value instead of a DateTime value. Furthermore, the control is formatting the wrong stored Text value as per operator timezone/locale and presenting an incorrect value on the screen.

Error Messages



Not Applicable


Steps to Reproduce



1. Declare a page in 'Pages & Classes' tab of a section. 
2. Make sure
this page is not instantiated by any logic of application by the time this section renders real time.


Root Cause



When you define a Page with it's class on 'Pages & Classes' tab of a section rule, at runtime the page will be classless - this is expected if it is not already present on the clipboard.
P
ages-and-classes entry does not itself create pages.

1.jpg

2.jpg

When screen is loaded we see that WPg is classless rather, the root cause.

2.jpg 1.jpg

Enter date value into fields and submit to clipboard these are stored as text values

1.jpg

1.jpg

These incorrectly stored values are assumed to be in GMT and displayed by converting to operator timezone, by pxDateTime

1.jpg

Resolution



Make sure the Page declared in 'Pages & Classes' is instantiated through the application logic and is present on clipboard by the time the section executes or loads.

Published September 3, 2016 - Updated October 8, 2020

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