The date picker does not loaded when forum language is Chinese Simplified because const userLang = app.translator.getLocale(); return zh-Hans instead of zh, this caused the JS not loaded correctly when calling flatpickr's functions. In nutshell, flatpickr requires zh, while the flarum method return zh-Hans.
Possible Fix
Currently, we replace the const userLang with zh to solve the problem. In alternative, I think the problem can also be solved by creating a mapping to these particular languages.
Description
The date picker does not loaded when forum language is Chinese Simplified because
const userLang = app.translator.getLocale();
return zh-Hans instead of zh, this caused the JS not loaded correctly when calling flatpickr's functions. In nutshell, flatpickr requires zh, while the flarum method return zh-Hans.Possible Fix
Currently, we replace the const userLang with zh to solve the problem. In alternative, I think the problem can also be solved by creating a mapping to these particular languages.