casbloem / vue-luxon

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

Error when using filter on Luxon object #18

Open AAllport opened 3 years ago

AAllport commented 3 years ago

When using the filter on a luxon object, the error here gets triggered https://github.com/casbloem/vue-luxon/blob/1c59c7002dc6e48aa93ba47987bd4f79055a1112/src/main.js#L9

Take the following code: {{ dates.selected | luxon }} where dates.selected is an instance of DateTime. An error is thrown since DateTime does not have .value

Please can we consider adding support for adding the filter to instances of DateTime, as this feels like a fairly reasonable use-case in a strongly typed VueJs application?