Created
October 23, 2017 16:04
-
-
Save lancegliser/cdb29fd68c8aa301cc9b21f7cc513338 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // The date input stores the time in local timezone format | |
| // To output the string 'as it appears' rather than shifted by local | |
| // We have to shift the date by the offset before displaying it | |
| var displayDate = field.valueAsDate; | |
| displayDate.setMinutes(displayDate.getTimezoneOffset()); | |
| return displayDate.toLocaleDateString(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment