Can you change abbreviated months? #2882
Unanswered
pandamouse
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way to specify an abbreviated month? I'm upgrading from datetimepicker to tempus-dominus and does not recognise 'Sep' as September. I know Sept is more correct grammar wise but code wise 'Sep' seems to be the norm.
Similar issue was introduced in moment js that has since been reverted. moment/moment#2881
I tried overriding formatInput but by the time it gets there (e.g. input displaying existing data '21 Sep 2023'), it would already be complaining about not being able to parse the input. I also tried using extend(tempusDominus.plugins.moment_parse) but that doesn't seems to be working either. Is it possible to provide an override the formatInput method through the options?
Ok so the plugin didn't work for me because I loaded the plugin before tempus-dominus. I needs to be AFTER. This does not solve my problem though since I am also using tempus-dominus as a time picker where the format is different to the date picker. So I cannot apply this globally.
I've solved my issue by changing moment-parse plugin to use this.optionsStore.options.localization.format instead of option and just use moment format.
Beta Was this translation helpful? Give feedback.
All reactions