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 July 18, 2016 - Updated September 3, 2016

Have a question? Get answers now.

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