mengxiong10/vue-datepicker-next

[Bug] cannot run vue-datepicker-next in vue/compat - mode

Closed this issue · 1 comments

Datepicker version: vue-datepicker-next 1.0.3
Vue version: 3.4.21 with @vue/compat in full compat mode
Browser: Chrome 123.0.6312.58

Steps to reproduce

  • checkout 1db9afa
  • apply patch from the attachments
  • start the demo application

Reproduction Link or Source Code

  • see patch in the attachments (please just give me a hint if you prefer a clone or branch from this repository)

Expected behavior

  • timestamp should be shown in the input field
  • on click the calendar should be shown

Actual behavior

  • timestamp is not shown in the input field
  • on click nothing is shown but an error in the browser log as follows
message-compiler.esm-browser.js:99 Uncaught (in promise) SyntaxError: Invalid argument (at message-compiler.esm-browser.js:99:19)
    at createCompileError (message-compiler.esm-browser.js:99:19)
    at createI18nError (vue-i18n.mjs:103:12)
...
    at vue-good-table.esm.js:10108:35
    at renderList (vue.esm-bundler.js:5327:16)
    at vue-good-table.esm.js:10099:78

Annotation
after some debugging I do assume @vue/compat does suspect vue-datepicker-next to be a vue2 component. Because of this it generates a compatibity layer around the component, whereby all the props get lost. I cannot tell (yet), why @vue/compat acts like this but I've never seen this behaviour before (allthough I already migrated applications with around 500 components, also third party)

Workaround is to use old dependency until all compatibility issues are fixed, then switch compat mode of and then migrate to vue-datepicker-next.

vueDatepickerCompatibilityMode.patch.gz

duplicate to #41, sorry for the inconvenience