vue-datetime icon indicating copy to clipboard operation
vue-datetime copied to clipboard

Luxon Invalid unit zone

Open amrshakya opened this issue 2 years ago • 10 comments

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/

amrshakya avatar Sep 14 '21 05:09 amrshakya

+1 doesn't work with version 2.0.2 of luxon

antoineguillaume avatar Sep 24 '21 08:09 antoineguillaume

+1

ftbastler avatar Sep 28 '21 08:09 ftbastler

+1

FarhanKhalid avatar Sep 28 '21 17:09 FarhanKhalid

+1

Nabilezz avatar Oct 02 '21 17:10 Nabilezz

+1

alexakuna avatar Oct 06 '21 09:10 alexakuna

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:

eLoyyyyy avatar Oct 07 '21 07:10 eLoyyyyy

+1

I ended up just downgrading luxon to lates v1 version npm i [email protected]

aguyfromdenmark avatar Oct 19 '21 11:10 aguyfromdenmark

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 }),

syunchanp avatar Nov 06 '21 12:11 syunchanp

Alternatively you call roll back luxon npm install [email protected]

RUSHt avatar Nov 20 '21 13:11 RUSHt

+1

The workaround with [email protected] works great.

The correction is pending merge https://github.com/westnet-paul/vue-datetime/commit/ac84c239afe533e31d65e890501a40b4dcf7a1b5

SirTadpole avatar Nov 23 '21 09:11 SirTadpole