Fullcalendar.js get specific day of event on event click - fullcalendar

Is it possible to get specific day of event on event click?
Example:
I have one event that is through whole week. On eventClick() event i get object that has start date and end date. Is it possible to click on specific day of that event and get object that has date of the day i clicked on? Like if i click on event on monday i get the event object back AND date of that monday, and if i click on tuesday i get the same thing but with the date of that tuesday?
Thanks.

Related

Fullcalendar - Display an event with no end date

How do I go about displaying a long-running event with no end date? The data provided to me only shows when the event started but no end date because it's set to "Forever". It appears that when I only provide the start option, it only sets the event to show up on that day and not the following days.
I have a possible workaround for this, where if there is no end date from the event source, I always set the end date to 24 months from today, but that means if someone navigate the calendar past 24 months, the event would appear to have ended then. Would be nice to have something that will just keep going forever.

Fullcalendar - event shows wrong end date by one day

I have training events from database and their start and end dates are in this format "YYYY-MM-DD". For example is:
{
'title':'English Training',
'start':'2015-05-19',
'end':'2015-05-23'
}
But when it is rendered in calendar, it shows wrong end date
I tried adding 12hours on endDate (*just like the answer * here) , and yes it works but now I'm unable to extend the day for an event.
I want to fix this wrong end date issue without losing the capability to extend events. Do you know any solution or hacks?
Adding 12 hours on the endDate of your event won't make it an allDay event anymore, which is why you will loose the ability to extend your event in month view.
However, adding 1 day on the endDate will work perfectly as :
Your event will remain an allDay event (so it will remain extendable)
Your endDate will become 2015-05-24 (understood by FullCalendar as 2015-05-24T00:00:00) which means that your event will end at the very first minute of 2015-05-24 which is what you want.
To conclude : if you want an allDay event to end at midnight of day1, you have to set its endDate as day2 !

Show only Months with Events In them?

Would there be a way to limit the next/prev buttons to only show months with events registered in them? We have courses that fill up and I don't want users to have to fast forward through blank months where there is no availability of events. I'm also including holiday events from the basic google public holidays calendar and don't want to include those events.
As long as I know, this option does not exist in FullCalendar yet.
If you are retrieving events month by month:
You can bind fullcalendar's Next and Previous events to a new function. Inside this function, get the events and if there is no events, your function must call Next or Previous again.
If you are retrieving all events at once
You can bind fullcalendar's Next and Previous events to a new function. Inside this function, get all the events and look for the first date out of the current month. Set fullcalendar's current date for that month and refresh it.

How to display the calendar according to event data startdate

I have a event data which contains startdate and end date , i want to see the calendar holding that event,now what is happening is it is showing the current week calendar ,but if my event having previous week satrtdate means i have to go to previous week and and i can able to see the event data in calendar..but i want to focus that date calendar at first shot itself..pls do the needful its urgent, i think i have to change something in fullcalendar.js but i dont know where to change pls do needful
Check the documentation for FullCalendar... http://arshaw.com/fullcalendar/docs/current_date/
This shows parameters that can be set to get the calendar to initate at a particular date.. by default it will always start at todays date.

Determine which day event is on when event is selected in fullcalendar

When an event is clicked, is there any way to determine which date this event falls on? Im running into this issue when dealing with events that span multiple days, and since the event only contains a start and end date, I have not found any way to ascertain which date of the multi-day event was selected.
You can pass additional fields into your JSON object when you bind up your events.
For example, I pass in a "leave" parameter that tells me whether an event is an appointment or a part of the day off.

Resources