Innologica / vue2-daterange-picker

Vue2 date range picker
https://innologica.github.io/vue2-daterange-picker/
MIT License
329 stars 208 forks source link

@startSelection and @finishSelection doens't fire, could anyone provide code usage with that? #277

Closed Rai-burger closed 2 years ago

nkostadinov commented 2 years ago

I added event listeners to the demo page, they print the event with its params in the console.

likol commented 2 years ago

@nkostadinov I have same issue too. I'm pretty sure that is a bug. according vue2 documents, event names don’t provide any automatic case transformation and HTML’s case-insensitivity so v-on:myEvent would become v-on:myevent – making myEvent impossible to listen to. refer to vue2 document

nkostadinov commented 2 years ago

I'll fix the names, but current demo page has working event handlers like this:

        @startSelection="logEvent('event: startSelection', $event)"
        @finishSelection="logEvent('event: finishSelection', $event)"
likol commented 2 years ago

@nkostadinov Yes, i notice it. I don't know why... my guess Vue CLI build process (Webpack pipeline) may fixed the problem ? it occur on browser directly included script /dist/vue2-daterange-picker.umd.js which issue we disscuss.

AnjaliTonylijo commented 2 years ago

@nkostadinov I am still not able to trigger the startSelection event, is it possible to call a custom method on emit.

nkostadinov commented 2 years ago

I refactored the event names so now it should be ok