Closed thomcuddihy closed 10 months ago
should be fixed in titra version 0.96.3! Thank you very much for the very detailed bug report and suggested solution - that is greatly appreciated. If you encounter further issue feel free to reopen this issue!
Clicking on the calendar icon the tracktime page generates the following error:
Looks like tinydatepicker is defined when the
weekDaysMin
andmonths
are not empty: https://github.com/kromitgmbh/titra/blob/3757150a287eb45702d81ced76ebb538f49f4a00/imports/ui/pages/track/tracktime.js#L47And those are set here based on locale: https://github.com/kromitgmbh/titra/blob/3757150a287eb45702d81ced76ebb538f49f4a00/imports/utils/i18n.js#L51
Problem is, the dayjs en locale doesn't include
weekDaysMin
for some reason: https://github.com/iamkun/dayjs/blob/bdcc336613c9fa466b385574e88d0b43629475bc/src/locale/en.js#L2Have tested this by switching user language setting to non-English languages and it works fine.
A suggested fix would be switch the failover locale in the try/catch from
en
to something like `en-gb' here: https://github.com/kromitgmbh/titra/blob/3757150a287eb45702d81ced76ebb538f49f4a00/imports/utils/i18n.js#L67Since the more specific en locales in dayjs do have
weekDaysMin
:https://github.com/iamkun/dayjs/blob/bdcc336613c9fa466b385574e88d0b43629475bc/src/locale/en-gb.js#L8
Assuming it's tripping here: https://github.com/kromitgmbh/titra/blob/3757150a287eb45702d81ced76ebb538f49f4a00/imports/utils/i18n.js#L52
(I'm down my dev computer, and can't test or make a pull request, sorry)