sumcumo / vue-datepicker

A datepicker Vue component. Compatible with Vue 2.x.
https://sumcumo.github.io/vue-datepicker/
Apache License 2.0
75 stars 22 forks source link

Passing function to `format` without also passing `parser` results in errors #210

Open mryellow opened 2 months ago

mryellow commented 2 months ago

Errors trying to do .match() on a function rather than a string.

https://github.com/sumcumo/vue-datepicker/blob/928a999f197d2047e73b5b83b14a248934a46a74/src/utils/DateUtils.js#L13-L21

Passing the undocumented parser property results in bypassing this codepath and no longer expecting format to always be a string:

https://github.com/sumcumo/vue-datepicker/blob/928a999f197d2047e73b5b83b14a248934a46a74/src/utils/DateUtils.js#L343-L345