Giter VIP home page Giter VIP logo

fullcalendar's Introduction

FullCalendar

Full-sized drag & drop calendar in JavaScript

Connectors:

Bundle

The FullCalendar Standard Bundle is easier to install than individual plugins, though filesize will be larger. It works well with a CDN.

Installation

Install the FullCalendar core package and any plugins you plan to use:

npm install @fullcalendar/core @fullcalendar/interaction @fullcalendar/daygrid

Usage

Instantiate a Calendar with plugins and options:

import { Calendar } from '@fullcalendar/core'
import interactionPlugin from '@fullcalendar/interaction'
import dayGridPlugin from '@fullcalendar/daygrid'

const calendarEl = document.getElementById('calendar')
const calendar = new Calendar(calendarEl, {
  plugins: [
    interactionPlugin,
    dayGridPlugin
  ],
  initialView: 'timeGridWeek',
  editable: true,
  events: [
    { title: 'Meeting', start: new Date() }
  ]
})

calendar.render()

Development

You must install this repo with PNPM:

pnpm install

Available scripts (via pnpm run <script>):

  • build - build production-ready dist files
  • dev - build & watch development dist files
  • test - test headlessly
  • test:dev - test interactively
  • lint
  • clean

Info about contributing code »

fullcalendar's People

Contributors

acerix avatar alfill avatar arshaw avatar avindra avatar caseyjhol avatar ettiennelouw avatar flack avatar floriancargoet avatar idrafttt avatar ivaynberg avatar jagthedrummer avatar joankaradimov avatar joelzanden avatar jstacoder avatar kdenzel avatar laoneo avatar levon-isajanyan avatar livmackintosh avatar martijnwelker avatar naguumo avatar nemanja947 avatar njpearman avatar paw3lx avatar peternowee avatar rangermeier avatar rouche avatar sirrocco avatar timvdlippe avatar tpruvot avatar vidbina avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fullcalendar's Issues

Add some localization

Originally reported on Google Code with ID 3

It would be great having the possibility to set another day (monday) for
week start and select another time format (24h).

Reported by ottsch on 2009-04-29 13:54:26

jspdf landscape

Hi

Can we increase the height of landscape page without change in width.

I tried -
var doc = new jsPDF('l', 'mm', [297, h]);

here width is also change according to height.
http://jsfiddle.net/xzZ7n/2751/

Thanks

Nitin

Add support for Agenda view

Originally reported on Google Code with ID 4

Possible to add an agenda view? this would be excellent as you can have a
main calendar view and on the front page have an agenda view for upcoming
events. 

Either way top job.

Reported by abeliever on 2009-05-03 02:06:14

calevents array: can i get something out on a dayclick?

Originally reported on Google Code with ID 16

When i do a custom function with an ajaxcall on the 'events' parameter,
like you show in the documentation 'Event Data provider', i get a result
from PHP. But can i keep this array and use it lateron for example on a
dayClick event to show the events of that day beneath the calendar? 
I tried to put in a var but it is undefined when i want to use it.


Reported by paul.wolbers on 2009-05-19 11:13:46

slotEventOverlap custom rendering question.

slotEventOverlap

Determines if timed events in agenda view should visually overlap.

Boolean, default: true
When set to true (the default), events will overlap each other. At most half of each event will be obscured:

I'm needing to have a slot event overlap completely within another event. For example, from 8am - 12pm, an event can be created that will identify what types of events can be booked into the slot. When a user would book into the slot, the event would appear within the 'parent' slot. Currently it overlaps, but only by 50% and the edges of the 'child' event stick out. Is there any way to customize this to show inside completely?

I attempted to use background events, but I need to be able to put a description on the parent event to identify what can be booked there / what it's purpose is. Currently it appears background events don't suppor this. I also need the ability to create an event outside of this parent and render it without any overlapping. Background events don't seem to have the ability to not overlap with normal events so I don't think this will work.

Can you provide some information that I might have missed in making this possible? Any other ideas for accomplishing this?

Thanks

Passing data to background event object

Hi all,
Is there a way to get a data that I passed to eventObj when user clicks on background event?
My sample background event looks like this:

{
      id: 'availableForMeeting',
      title: 'Test Background Event #1',
      start: '2015-08-13T07:30:00',
      end: '2015-08-13T12:30:00',
      rendering: 'background',
      sampleId: 214,
      color: 'red'
}

But I can't get sampleId field, 'cause it doesn't exist in jsEvent.

Bad calculation in slotTableFirstInner at setHeight function

Hi all...

I recently saw this bug on fullCalendar 1.6.1 and still buggy in fullCalendar 1.6.2.

So i was looking for a solution and i found this thread on Google Code FullCalendar project's.

https://code.google.com/p/fullcalendar/issues/detail?id=1035

This is the function. Change that line and voilá bug fix.

function setHeight(height, dateChanged) {
//.....
++slotHeight = slotTableFirstInner.parents('tr').outerHeight() + 1; // +1 for border
--slotHeight = slotTableFirstInner.height() + 1; // +1 for border
//......
}

refetchEvents for multiple specific sources

Hi,

I'm using both regular and background events on my calendar. Background events are used to highlight forbidden places for regular events, and are updated dynamically whenever such an event is selected (eventClick() or eventDragStart() callbacks) via the method 'refetchEvents'.

In the case of a click, everything works well. In the case of a drag however, the 'refetchEvents' causes the selected event to be refetched as well, thus leading to graphical glitches (event displayed twice, initial event not moving, ...).

The best workaround I found for this issue is to set a global property to prevent that the event is displayed (in the eventRender() callback) while it is dragged, and then in the eventDrop() callback I can manually update its start and end times according to delta. This is a ugly hack and it doesn't solve all bugs in my application.

A much simpler solution to that would be to allow to refetch events from a single source, leaving other events unchanged, but I don't think this is possible with the current API.

Is there something I am missing?

Thanks in advance

FileFormat for week

Hi all!

I need title format like this e.g. August 9 - 15 August, 2015.
For now I'm using format like this "MMMM D MMMM, YYYY" it works ok, but when we have another month they will duplicate e.g. August 30 August - September 5 September, 2015.

Could help me please choose correct titleFormat ?
Thank you!

scheduler "eventResourceField" not working

Hi there.
This option doesn't appear to be working. The event still renders in week and month view, but not rendering on a timeline view with relevant resource.

I have used the 'simple. html' demo available to test.
The only amendment made was including the eventResourceField option set to 'userid'.
I added the userid key in each event object of the simple demo with the original resourceId as the value. I also removed the resourceId key value form the event object.
Please see below image

image

Script versions used as per the demo files
FullCalendar v2.3.2
jQuery v2.1.4
jQuery UI - v1.11.4
moment.js v2.10.3
Scheduler v1.0.0-beta

The 'agendaWeek' or 'agendaDay' views can not trigger 'dayRender'

Originally reported on Google Code with ID 1956

Enter a detailed description
 I want render context menu on the 'agendaWeek' cell, but i find this callback can
only support 'basicWeek' and 'basicDay' views.
So, i thought of a temporary solution.In 'agendaWeek' each cell on the floating div,
then bind the 'dayRender' trigger.
Remark:Code modifications on fullCalendar v1.6.2

    function setWidth(width) {
        viewWidth = width;
        colPositions.clear();
        colContentPositions.clear();

        var axisFirstCells = dayHead.find('th:first');
        if (allDayTable) {
            axisFirstCells = axisFirstCells.add(allDayTable.find('th:first'));
        }
        axisFirstCells = axisFirstCells.add(slotTable.find('th:first'));

        axisWidth = 0;
        setOuterWidth(
            axisFirstCells
                .width('')
                .each(function(i, _cell) {
                    axisWidth = Math.max(axisWidth, $(_cell).outerWidth());
                }),
            axisWidth
        );

        var gutterCells = dayTable.find('.fc-agenda-gutter');
        if (allDayTable) {
            gutterCells = gutterCells.add(allDayTable.find('th.fc-agenda-gutter'));
        }

        var slotTableWidth = slotScroller[0].clientWidth; // needs to be done after axisWidth
(for IE7)

        gutterWidth = slotScroller.width() - slotTableWidth;
        if (gutterWidth) {
            setOuterWidth(gutterCells, gutterWidth);
            gutterCells
                .show()
                .prev()
                .removeClass('fc-last');
        }else{
            gutterCells
                .hide()
                .prev()
                .addClass('fc-last');
        }

        colWidth = Math.floor((slotTableWidth - axisWidth) / colCnt);
        setOuterWidth(dayHeadCells.slice(0, -1), colWidth);

        if(viewName == 'agendaWeek' || viewName == 'agendaDay'){
            dayRenderByAgendaWeek();
        }
    }

    function dayRenderByAgendaWeek() {
        $("table.fc-agenda-slots td").each(function (i, _row) {
            var $div = $(_row).find("div:first");
            $div.html("");
            for (var col_index = 0; col_index < colCnt; col_index++) {
                var s = "<div style='float:left;width:" + colWidth + "px'></div>";
                var cell = $(s).appendTo($div);
                var date = cellToDate(0, col_index);
                var rowMatch = this.parentNode.className.match(/fc-slot(\d+)/);
                if (rowMatch) {
                    var mins = parseInt(rowMatch[1]) * opt('slotMinutes');
                    var hours = Math.floor(mins / 60);
                    date.setHours(hours);
                    date.setMinutes(mins % 60 + minMinute);
                    trigger('dayRender', t, date, cell);
                }
            }
        });
    }

Reported by adamrshaw on 2013-08-11 03:54:53

IE6 - Loading calendar via ajax causes draggable content to show in wrong place

Originally reported on Google Code with ID 1

What steps will reproduce the problem?
1. have a div on left/top and another div right/bottom
2. load calendar through ajax ($.get, $.post) and have it show in
right/bottom div
3. lock station, unlock station

What is the expected output? What do you see instead?
Initially, content is shown properly. Once the window is either resized, or
a lock/unlock of the station is done - events will show on the left side of
the screen, as if the other divs didn't exist. This doesn't happen when
calendar is not loaded via ajax.

What version of the product are you using? On what operating system?
v1.0 rev 4

Please provide any additional information below.
draggables on or off doesn't change the behavior. 

Additionally, your demo doesn't load on IE6 from your web site ( but it
loads fine on my own website ) -- getting some javascript errors.

Didn't see issues with Firefox 3.0.8. 

Reported by srabouin on 2009-04-28 17:50:55

BUG- Event spanning all day are on day too short.

I'm passing to fullcalendar an event like this one: {id: 31, title: 'Test', start: '2014-12-22', end: '2014-12-23', allDay: true } I expected to find in the calendar an event that spans two whole days, but the event is only in the 2014-12-22 slot, not in the 2014-12-23 one.

color days with events

Originally reported on Google Code with ID 17

is it possible to hide the events, but color the days with events? I would
like to make a small view of the calendar too, and then there is not enough
space for the eventtext on every day...

Reported by paul.wolbers on 2009-05-19 11:15:17

Event Types - Classes - With Solution

Originally reported on Google Code with ID 13

Needed to have different types of events listed on the calendar .. eg
Office Events, Personal Events, Holidays etc   so came up with this solution..

the returned CalEvent has an optional "class" attribute.. then in the
fullcalendar.js i added the following lines

before line 433 ( buildEventText(event, element.find('td.c')); )
i added:
  if (typeof event.class != 'undefined' && event.class != '') {
element.addClass(event.class);
}

I know this can be achieved via the eventRender option 

eventRender: function(event,element) {
 if (typeof event.class != 'undefined' && event.class != '') {
   element.addClass(event.class);
  }         
}

but this support "out of the box" would be good.

eg if the event's class is officeEvent, then css code can then be added as so:
.full-calendar-month .officeEvent td { 
background: #35698F !important; 
color: #FFF !important; 
}
// this changes the event's colouring to make it differentiable from other
events


Reported by Totally.Kitten on 2009-05-14 16:09:26

Evenly expand timeGrid slots to fit height

This comes from Fit calendar to container stackoverflow question


I'm trying to make the fullcalendar fitting on the container without success. I've been modifying contentHeight, height and aspectRatio without results.

contentHeight:'auto' is working fine if container is not bigger than the content, displaying scrollbars.

Best calendar configuration I got looks like:

$('#calendar').fullCalendar({
   header: {
            left: '',
            center: '',
            right: ''
        },
    defaultView:'agendaWeek',
    contentHeight:'auto',       //auto
    slotDuration: '00:60:00',        
});

If I get dynamically the size and I set it:

$('#calendar').fullCalendar({
       header: {
                left: '',
                center: '',
                right: ''
            },
        defaultView:'agendaWeek',
        contentHeight:766,     //specific height instead of auto
        slotDuration: '00:60:00',        
    });

The calendar expands, but only the last row, displaying an ugly last row like instead of increasing each row to fit the content. It looks like the following:

Last row with fixed contentHeight

Is it possible to 'maximize' the calendar to fit the container?

I did a plnkr where you can reproduce/fork it.

Note: I can't resize the container and the container height is dynamic.

Request: Repeating Events

Originally reported on Google Code with ID 18

Hey,

at first i have to say, that the calendar is awesome!!! ;) Great job!

I just miss 1 feature. It would be great if i could create repeating events.

My first thought was to have wildcards like "start: new Date(*, *, 6)" to
have an event on every 6th day of a month.

Another wish is, to give an event a new declaration of repeating days. Like
i can say that it repeats every 10 days.

I hope you understand what i mean! ;)

Greetings from Germany

Florian

Reported by crazyachmet on 2009-05-20 08:58:46

Week view and Day view

Originally reported on Google Code with ID 2

I'd like to see you extend this to include a Week View and Day View of
events. Day View would be blocked out in 15 minute increments so that
events could be dragged around to any time block starting on :00, :15, :30
or :45.

Reported by brilang on 2009-04-28 19:28:15

event manipulation

Originally reported on Google Code with ID 12

be able to to individually add/delete/modify events after the initial page
load.

Reported by adamrshaw on 2009-05-13 15:30:43

sort events by time

Originally reported on Google Code with ID 10

events that appear on same day need to be ordered by time

Reported by adamrshaw on 2009-05-09 03:00:59

JSON with callback problem in IE. Events don’t show up

Originally reported on Google Code with ID 14

It appears that when you implement JSON with a callback as suggested in the
documentation, IE (6/7) returns an error, and the calendar does NOT display
the events (the calendar itself renders fine). The error is 'Unexpected
call to method or property access'.

Reported by eugene2vb on 2009-05-15 00:01:55

CSS background colour for weekends

Originally reported on Google Code with ID 11

I loved version 1 but 1.1 is even better.

One thing though is it possible to have the weekend days (Saturday &
Sunday) different background colour from the Weekdays so that users can
easily see when the weekend is

Reported by [email protected] on 2009-05-11 12:51:59

Basic day view

There seems to be no default option to prevent the calendar from switching into the basic day view on resize when we're dealing with small and x-small devices. This would be appreciated since the basic day view makes big changes to the callendar that might not be wanted.

Add Multiple JSON Set Support

Originally reported on Google Code with ID 7

We run several types of events that are brought back in different JSON
sets, as a result of coming from different databases. 

Example: Client Meetings (Client dbase), Employee Vacations (HR dbase)

I have attempted to load both sets into a dynamically built JSON set, but
the dates are not chronological between sets and the plugin fails to load.

Thanks again for the incredible work!

Reported by shaunpcollins on 2009-05-05 05:41:23

JS error on sample instructions

I wrote a test case based on the sample instructions of the documentation and I'm getting a javascript error in the console.
Uncaught TypeError: Cannot read property 'each' of null on fullcalendar.js:5022

<html>
  <head>
    <link rel='stylesheet' href='//cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.3.2/fullcalendar.min.css' />
    <script src='//cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-alpha1/jquery.min.js'></script>
    <script src='//cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.3/moment.min.js'></script>
    <script src='//cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.3.2/fullcalendar.js'></script>
    <style type="text/css">
      #calendar {
        width: 800px;
        height: 500px;
      }
    </style>
  </head>
  <body>
    <div id="calendar"></div>

    <script>
      $(document).ready(function() {
        $('#calendar').fullCalendar();
      });
    </script>
  </body>
</html>

On the page, it just renders the "today" and "< >" buttons and not the calendar (until I click "today"). If I switch to v2.3.1 of fullcalendar.js the error disappears and it works.

opera 9.25

Originally reported on Google Code with ID 9

events rendered in wrong places

Reported by adamrshaw on 2009-05-09 02:59:48

Add Event Class Property

Originally reported on Google Code with ID 6

Would need to be able to have styling option per event to signify event
types or calendar group. Assigning a class per element would be perfect.

Great work to this point.

Reported by shaunpcollins on 2009-05-05 02:30:42

Patch to add event id to each event table

Originally reported on Google Code with ID 8

This adds "event_<id>" as an id for each event on the calendar.

Reported by andnat on 2009-05-08 01:40:57


- _Attachment: [patch.txt](https://storage.googleapis.com/google-code-attachments/fullcalendar/issue-8/comment-0/patch.txt)_

callback before render

I'm trying to do something whenever the calendar changes (view, date, new events). There is no callback for this. viewDisplay() works only when changing view or date. Not when refetching events (changing to another person calendar in my app). I could use eventAfterAllRender() but I want my code to trigger before fetching events and rendering. Also loading() only triggers when it actually needs to fetch new data, so not when a view is changed. What are your thoughts on:

  1. viewDisplay() should be triggered on refetchEvents()
  2. introduce new callback which is triggered before rendering. beforeRender()

'clientEvent' returns wrong time

When I use the following code outside the code of fullClanedar. It gives me wrong time:

var tempEventWithOlderInfo = calendar.fullCalendar( 'clientEvents' ,'_fc789' )[0];
alert(tempEventWithOlderInfo.start.getHours());

If the original start time of the event is 6:30 AM it alerts 5 instead of 6.

When I use this code in eventClick callback of the fullCalendar it works fine. But when I use the same code in callBack of my dialogbox buttons (outside the fullcalendar code). It alerts wrong time.

Delay and cancel AJAX requests on event sources when month changed

I can't seem to find an issue about this which I am surprised by. Sorry if this is a duplicate.

I have this issue where if the current month is October and you want to go back to say February. Every time you click to view the previous month, it does an AJAX call (multiple if you have many event sources) and as a result slows down loading while it ques a bunch of AJAX calls.

It would be great if we could do two things:

  1. Specify a delay on how long before it starts to do the AJAX call when a month/view is changed.
  2. If AJAX calls are in progress when you choose another month/view, cancel those AJAX calls and start the new AJAX calls for the new month.

IE issue.. draggable events when page refresh the events will return to their original day/date

Originally reported on Google Code with ID 5

What steps will reproduce the problem?
1. This happens in IE only. If i drag the event/s to another date then
refresh the page, the event would return back to the original date. More
like its been cached. Also happens when i will call
$('#calendar').fullCalendar('refresh') after eventDrop. This only happens
in IE though..

What is the expected output? What do you see instead?
Event must be in correct date/day after eventdrop and page refresh.

What version of the product are you using? On what operating system?
Version 1. revision 4

Please provide any additional information below.

Reported by albert.osmena on 2009-05-05 02:19:52

Google Calendar Integration Issue

I followed your instructions as per documentation. However I'm receiving an error.

Uncaught ReferenceError: moment is not defined

image

Incomplete bottom border in Firefox

I use FullCalendar 2.3.2. I found that if I enable jquery UI theme without setting eventLimit: true in init FullCalendar, the bottom border will disappear in Firefox. This does not occur in Chrome or Safari.

Here is a demo jsFiddle.

multiple events on 1 day not shown correct

Originally reported on Google Code with ID 15

What steps will reproduce the problem?
1. set multiple events starting on same date
2.
3.

What is the expected output? What do you see instead?
events beneath eachother, instead the events are on top of each other

What version of the product are you using? On what operating system?
1.1
Windows Vista

Please provide any additional information below.

Reported by paul.wolbers on 2009-05-18 11:33:13

dragScroll with outside draggables

Hey guys, not sure if it's a bug or expected behavior, but when I'm dragging one event that is in the calendar already, the scroll works just fine (as expected here: "Whether to automatically move scroll containers during event drag-and-drop or while selecting." - dragScroll).

But when I'm dragging an event from outside into the calendar, then the scroll doesnt work.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.