formio / formio.js

JavaScript powered Forms with JSON Form Builder
https://formio.github.io/formio.js
MIT License
1.86k stars 1.05k forks source link

FIO-7631: Fixes an issue where timezone is added to the date in PDF download for TextField with CalendarWidget #5451

Closed alexandraRamanenka closed 7 months ago

alexandraRamanenka commented 7 months ago

Link to Jira Ticket

https://formio.atlassian.net/browse/FIO-7631

Description

We don't want to use formatOffset function if time is not enabled cause it will add timezone to the dates that have only day/month/year

Breaking Changes / Backwards Compatibility

Use this section to describe any potentially breaking changes this PR introduces or any effects this PR might have on backwards compatibility

Dependencies

Use this section to list any dependent changes/PRs in other Form.io modules

How has this PR been tested?

Manually, I also was trying to add automated tests, but because zonesPromise never resolves in the test mode, my test will always pass

Checklist: