Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] Unable to use native event in v-calendar in @click:more event #9485

Closed
slash006 opened this issue Oct 28, 2019 · 3 comments · Fixed by #14307
Closed

[Bug Report] Unable to use native event in v-calendar in @click:more event #9485

slash006 opened this issue Oct 28, 2019 · 3 comments · Fixed by #14307
Assignees
Labels
C: VCalendar VCalendar T: bug Functionality that does not work as intended/expected
Milestone

Comments

@slash006
Copy link

Environment

Vuetify Version: 2.1.5
Vue Version: 2.6.10
Browsers: Chrome 76.0.3809.87
OS: Linux x86_64

Steps to reproduce

  1. set event @click:event="eventClicked" and add eventClicked({ nativeEvent, event })
    both parameters are defined and work properly
  2. set event @click:more="clickedMore" and add clickedMore({ nativeEvent, event })
    nativeEvent is undefined

Expected Behavior

@click:more will provide native JS and vue events.

Actual Behavior

native event is undefined

Reproduction Link

https://codepen.io/slash006/pen/KKKvPqw

@ghost ghost added the S: triage label Oct 28, 2019
@ClickerMonkey ClickerMonkey self-assigned this Dec 14, 2019
@Leespiker Leespiker added T: bug Functionality that does not work as intended/expected and removed S: triage labels Apr 5, 2020
@Suhasnama
Copy link

Hi @ClickerMonkey , i had experienced the same with @click:day event

<v-calendar
   ref="calendar"
   @click:day="dayEvent"
></v-calendar>

Type 1

<script>
export default {
methods: {
dayEvent({nativeEvent, event}) {
console.log("nativeEvent ", nativeEvent)
console.log("nativeEvent ", event)
}
}
</script>

The above code resulted in following output.

nativeEvent  undefined
event  undefined

Type 2

<script>
export default {
methods: {
dayEvent(nativeEvent, event) {
console.log("nativeEvent ", nativeEvent)
console.log("nativeEvent ", event)
}
}
</script>

The above code resulted in following output.

nativeEvent  {date: "2020-10-11", time: "", year: 2020, month: 10, day: 11, …}
event  undefined

I think the nativeEvent is missing for @click:day event also.

@mattnathan
Copy link

(if you would prefer a separate issue for this, just let me know)

This issue also applies to the mouse* events (mousemove:time for example). I was attempting to recoginise modifier keys while dragging calendar events but without the native event passed into my callback this is very difficult.

What would the implications be for adding this functionality to all events via the mouse.ts#getMouseEventHandlers method. I feel it could be added quite easily just before the $emit call is issued, not sure of the side effects though.

@Flomp
Copy link

Flomp commented Aug 4, 2021

Is there any update on this? I would like to open a context menu below the day of the month link via @click:date. However I cannot set the activator of the menu as I do not have access to the nativeEvent property. Is there any way I can do this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VCalendar VCalendar T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants