casbloem / vue-luxon

Easy use of datetime with Luxon in Vue
https://npmjs.com/package/vue-luxon
72 stars 8 forks source link

dt.setLocale is not function when using filter #5

Closed Iworb closed 6 years ago

Iworb commented 6 years ago

Latest version doesn't work with default settings. There's an example: https://codesandbox.io/s/rmnro11o34 There's a Console tab in the bottom of the page where you can find error:

Error in render: "TypeError: dt.setLocale is not a function"

casbloem commented 6 years ago

The default serverFormat is ISO. You re using new Date(). This does not return an iso format string.

Take a look: https://codesandbox.io/s/7k52njmkj0
https://codesandbox.io/s/zn4xxk7rrp

casbloem commented 6 years ago

Dev console errors are coming next version to prevent pointless errors like this.

Iworb commented 6 years ago

@casbloem your example is the same as mine with the same error, May I have some working one?

casbloem commented 6 years ago

oeps my bad. I clicked fork instead of save..

here: https://codesandbox.io/s/zn4xxk7rrp