I started a YearView in fullcalendar (derived from the basic 'MonthView', needed to display longer events such as school holidays), and I could use a hand if anyone is already familiar with the way events get displayed on a view.
See my github fork at https://github.com/Paulmicha/fullcalendar
-> example file is https://github.com/Paulmicha/fullcalendar/blob/master/tests/year-view-test-01.html
If you are using Custom View, you can change the visibleRange in the same way: calendar. changeView('timeGrid', { start: '2017-06-01', end: '2017-06-05' }); This date/visibleRange parameter was added in version 3.3.
Calendar::getDate Returns a Date for the current date of the calendar. For month view, it will always be some time between the first and last day of the month.
Detect when the user clicks on dates or times. Give the user the ability to select multiple dates or time slots with their mouse or touch device. Allows a user to highlight multiple days or timeslots by clicking and dragging.
The calendar's dates can change any time the user does the following: click the prev/next buttons, change the view, click a navlink. The dates can also change when the current-date is manipulated via the API, such as when gotoDate is called. datesSet is called after the new date range has been rendered.
FullCalendar Documentation: http://arshaw.com/fullcalendar/docs/
Loading events as JSON: http://arshaw.com/fullcalendar/docs/event_data/events_json_feed/
Render event: http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/
Render event example:
fc.fullCalendar('renderEvent', { 'id': 1, 'title': 'Test Event 1', 'start': '2009-11-05T13:15:30Z', 'end': '2009-11-05T13:30:00Z' });
Limit the display of available months: Fullcalendar limit the display of available months?
Alternatively if you need year view something like this:
You can install it via npm https://www.npmjs.com/package/fullcalendar-year-view
Steps:
cd yourFileLocation npm init (press enter) npm i fullcalendar-year-view
To get lib files go to yourFileLocation/node_modules/fullcalendar-year-view/dist/
Or alternatively, you can use browserify for your page
Include css & js lib files to your page
Finally use 'year' view
$('#calendar').fullCalendar({ header: { left: 'prev,next today', center: 'title', right: 'year,month,basicWeek,basicDay' } ....
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With