vue-datetime
vue-datetime copied to clipboard
Luxon Invalid unit zone
Versions
- vue: 2.6.14
- vue-datetime: 1.0.0-beta.14
- luxon: 2.0.2
Description:
Getting Invalid Unit zone error when use luxon version 2.0.2 but when downgrade luxon version to 1.15.0 the issue seems to be resolved.
Steps To Reproduce:
- Install latest version luxon & vue-datetime.
Including a reproduction would be great. You can fork this fiddle: https://jsfiddle.net/7mvpgsc4/
+1 doesn't work with version 2.0.2 of luxon
+1
+1
+1
+1
currently I have a workaround until author resolves the dependency to the library itself.
yarn add luxon@1 // so the library resolves the correct version.
yarn add luxon-next@npm:luxon // installed luxon v2.x.x aliased as luxon-next
My version are:
This issue was effected luxon's change fromObject and normalizeObject method(datetime.js)
You want to revise, remove [zone: "UTC"] If I had time, I will do pull request of this issure. Or Someone please pull request this issue.
== DatetimeCalendar.vue:60
data () {
return {
newDate: DateTime.fromObject({ year: this.year, month: this.month, zone: 'UTC' }),
remove zone: "UTC"
data () {
return {
newDate: DateTime.fromObject({ year: this.year, month: this.month }),
Alternatively you call roll back luxon npm install [email protected]
+1
The workaround with [email protected] works great.
The correction is pending merge https://github.com/westnet-paul/vue-datetime/commit/ac84c239afe533e31d65e890501a40b4dcf7a1b5