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

FullCalendar eventClick fire dayClick #4372

Closed
meridPL opened this issue Nov 7, 2018 · 5 comments
Closed

FullCalendar eventClick fire dayClick #4372

meridPL opened this issue Nov 7, 2018 · 5 comments

Comments

@meridPL
Copy link

meridPL commented Nov 7, 2018

I have problem with FullCalendar schedular. When I click event fired eventClick and get start and end date. When I click day fired dayClick get specif date. I need get specific date when click event, but don't fired dayClick.

eventClick: function( event, jsEvent, view ) { //I need date from dayClick console.log("eventClick"); console.log(event.start); }, dayClick: function( date, jsEvent, view, resourceObj ) { //not fired when click event console.log('dayClick'); console.log(date); }

@acerix
Copy link
Member

acerix commented Nov 7, 2018

Would you be able to post a runnable, stripped-down demonstration of the bug? Would really appreciate it because the time saved reproducing will be time spent fixing.

@meridPL
Copy link
Author

meridPL commented Nov 8, 2018

https://codepen.io/pawelI/pen/mQVoML

This is my example. When i click an event, I fire eventClick method in which I received date object. Unfortunately in date object, there is no value that tells which hour I clicked on. If I click in the middle of the event, I'd like to get information that I click on 8:30. One of my ideas to get that info is to fire dayClick method, which would return the expected value.

@acerix
Copy link
Member

acerix commented Nov 8, 2018

So you are looking for an option that will make dayClick trigger even if there is an event in the way?

You could also check the position that was clicked on and calculate the time that way:

https://codepen.io/anon/pen/LXNBPN?editors=0011

@meridPL
Copy link
Author

meridPL commented Nov 9, 2018

https://codepen.io/pawelI/pen/JeXQwW?editors=0011

Thank you for your help, I tried earlier your solutions, but I thought I could fire a dayClick. You can see in codepen my attempts which are similar. I think this issue can be closed.

@acerix acerix closed this as completed Nov 9, 2018
@adesheddie
Copy link

@meridPL
Did you find a way to get the clicked date via eventClick? It's really frustrating that such an important feature is not available....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants