CCALI / a2jviewer

This is the repo for the A2J Viewer
https://www.a2jauthor.org
Other
5 stars 8 forks source link

use clear format for dates #256

Open tobiasnteireho opened 9 months ago

tobiasnteireho commented 9 months ago

Datepicker can throw warning due to MomentJS https://momentjs.com/guides/#/warnings/js-date/ about ambiguous dates due to regex changing format. Should force an RFC format so behavior is more likely to be guaranteed consistent across browsers. Issue has been open in Moment since 2014 https://github.com/moment/moment/issues/1407

app.js:3 Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
Arguments: 
[0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: 10/09/2023, _f: undefined, _strict: undefined, _locale: [object Object]
Error
    at Function.eval [as createFromInputFallback] (https://hydra.a2jauthor.org/a2jauthor/dist/bundles/a2jauthor/app.js:3:563235)
    at De (https://hydra.a2jauthor.org/a2jauthor/dist/bundles/a2jauthor/app.js:3:574213)
    at Ue (https://hydra.a2jauthor.org/a2jauthor/dist/bundles/a2jauthor/app.js:3:577542)
    at Re (https://hydra.a2jauthor.org/a2jauthor/dist/bundles/a2jauthor/app.js:3:577409)
    at Fe (https://hydra.a2jauthor.org/a2jauthor/dist/bundles/a2jauthor/app.js:3:577128)
    at Be (https://hydra.a2jauthor.org/a2jauthor/dist/bundles/a2jauthor/app.js:3:577898)
    at ze (https://hydra.a2jauthor.org/a2jauthor/dist/bundles/a2jauthor/app.js:3:577932)
    at e (https://hydra.a2jauthor.org/a2jauthor/dist/bundles/a2jauthor/app.js:3:560323)
    at p.min (https://hydra.a2jauthor.org/a2jauthor/dist/bundles/a2jauthor/app.js:3:620976)
    at p.validateAnswer (https://hydra.a2jauthor.org/a2jauthor/dist/bundles/a2jauthor/app.js:3:669733)
v @ app.js:3
eval @ app.js:3
De @ app.js:3
Ue @ app.js:3
Re @ app.js:3
Fe @ app.js:3
Be @ app.js:3
ze @ app.js:3
e @ app.js:3
min @ app.js:3
validateAnswer @ app.js:3
get @ app.js:3
get @ app.js:3
getValue @ app.js:3
eval @ app.js:3
eval @ app.js:3
validateField @ app.js:3
onClose @ app.js:3
_hideDatepicker @ app.js:3
_selectDate @ app.js:3
_selectDay @ app.js:3
selectDay @ app.js:3
dispatch @ app.js:3
y.handle @ app.js:3