Show only Months with Events In them? - fullcalendar

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.

Related

Can we display Count of Events in a calendar day in Full Calendar

We are using Full Calendar Js and CSS. Requirement is to display the count of events instead of the event description on the calendar day. Is there a way we can do that?
In full Calendar there is a method to get all events in a calendar
calendar.getEvents() -> Array
which returns an array of all events stored in client side memory.
then you simply have to iterate through the array and look for events that overlap your target day.
Here are links to the documentation for the method
https://fullcalendar.io/docs/Calendar-getEvents
https://fullcalendar.io/docs/event-parsing

How to block dates in full calendar resource view?

I'm using fullcalendar resource schedular plugin trial version. I set a month view. I want to disable click event for days [Monday, Wednesday, Thursday and saturaday] of every month. So end-user can't book resources for those days.
I will suggest to use selectAllow function and inside the function write your logic which time to allow and which time to disallow user select on a slot.
https://fullcalendar.io/docs/selectAllow

Create multi-date google calendar event through URL

I'm trying to build an URL which will direct the user to their Google Calendar and will show the create event page with predefined values. I've managed to build the URL that will create an event only for a particular day. My problem is how can i add multiple dates in the same URL?
My generated URL is as follow:
https://www.google.com/calendar/render?action=TEMPLATE&text=New+Dynamic+Event&dates=20141204T073000Z/20141204T100000Z&details=Calendar+Details&location=My+Event+Location&followup=https://www.google.com/calendar&scc=1&sf=true&output=xml
This will create an event on 2014/12/04. How can i add more dates to this URL so that the event will be created on multiple days?
You cannot create multi date event in google calendar but you can insert the same event on different dates. Also, you can try using recurring events. However these type of events has patterns like weekly,monthly..
If you just provide the day date parts like
&dates=20170127/20170129
then this will raise the form with dates 2017-01-27 until 2017-01-28, and the 'all-day' box checked.
One day must be added to the date range.

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