CruGlobal / conf-registration-web

Event Registration Tool
https://www.eventregistrationtool.com
MIT License
2 stars 1 forks source link

Reimplementing the reverted PR #842/#843 but not included changes wer… #844

Closed dr-bizz closed 1 year ago

dr-bizz commented 1 year ago

Description

Re-adding changes which were on PR #842 but not included changes where localModel is set. https://secure.helpscout.net/conversation/2355398292/1014142?folderId=7296147

Changes

wrandall22 commented 1 year ago

Were you able to reproduce the issue from Helpscout before changes then confirm this does not have similar issues?

dr-bizz commented 1 year ago

Yes, the bug is in the code below, as Caleb was updating scope.localModel rather than just setting the initial value.

scope.localModel =
          scope.localModel && scope.monthYearOnly
            ? moment(new Date(scope.localModel)).format('YYYY-MM-DD')
            : scope.localModel
            ? moment(new Date(scope.localModel)).format('MM/DD/YYYY hh:mm A')
            : null;
let initialDate = scope.localModel || null;

https://github.com/CruGlobal/conf-registration-web/pull/842/files#diff-5ba14cf6c1e9ade6d0e7985ce3c5047d7e2069d7576426304725b7b4ceb13719R33-R39

I have not included this code in this PR. I have included the email question validation before sending it off to the server and setting the Grad date day to 10 to ensure time zones don't impact the value.

dr-bizz commented 1 year ago

Tested on staging and looks good to go.