Vuepic / vue3-date-time-picker

Datepicker component for Vue 3
https://vue3datepicker.com
MIT License
158 stars 13 forks source link

MonthPicker, TimePicker not working #92

Closed s-fog closed 2 years ago

s-fog commented 2 years ago

Hi. Have strange issue. Iam doing just same in docs, and picker not working. Html <Datepicker v-model="mmonth" monthPicker /> App.vue const ..., mmonth = ref({ month: new Date().getMonth(), year: new Date().getFullYear() }) return { ..., mmonth ... } Renders regular datepicker without any default value. image Opening as regular datepicker. I want monthpicker. image

I tried initialize mmonth.month and mmonth.year inside onMounted method, but it works the same way. I tried range datepicker and it works as expected. But this no. What am i doing wrong?

Jasenkoo commented 2 years ago

Are you using component in the browser script tag? Or some bundler like Vue-CLI or Vite?

s-fog commented 2 years ago

Thanks for reply! Iam using laravel + vue mix.js("resources/js/app.js", "public/js") .vue() Launching is npm run watch

Installing by this guide https://arter.dev/how-to-install-vue-3-in-laravel-8-from-scratch

Jasenkoo commented 2 years ago

Can you try passing prop like month-picker and tell me if it works

s-fog commented 2 years ago

It works! Thank you so much. I it described somewhere in docs?

Jasenkoo commented 2 years ago

There is info when you register the component in the browser, I guess, this is happening when using .min.js build, I'll see what is going on there.