Skip to content

Instantly share code, notes, and snippets.

@fIa5h
Last active January 4, 2016 23:19
Show Gist options
  • Save fIa5h/6e5ebfcdc01ea6fd7d88 to your computer and use it in GitHub Desktop.
Save fIa5h/6e5ebfcdc01ea6fd7d88 to your computer and use it in GitHub Desktop.

#Calendar Front End Documentation


##Events ####Example Event ```javascript { id: 1, title: 'UNFILLED SHIFT', type: 0, start: new Date(y, m, 1), end: new Date(y, m, 2), className: 'fc-0', slots:2, assignments:null } ``` Events are rendered intially using the ```.fullCalendar(events: [{}])``` declaration.

Event properties are defined follows:

  • id:

A unique ID. The front end uses this to update/delete the calendar item. If items share IDs, actions against an individual item are carried against the group that shares the same ID. For example, you can delete a series of events with one action if they all share the same assigned ._id. It is important to note that .fullCalendar() functions reference a psuedo created string mimic of the event .id that is found at ._id.

  • title:

The title or description of the item.

  • type:

0 = UNFILLED SHIFT
1 = FILLED SHIFT
2 = APPROVED DAY OFF REQUEST
3 = UNAPPROVED DAY OFF REQUEST
8 = SIGN OUT

  • start:

The date (and optionally time) that the event will start.

  • end:

The date (and optionally time) that the event will end.

  • className:

.fc-0 = UNFILLED SHIFT
.fc-1 = FILLED SHIFT
.fc-2 = APPROVED DAY OFF REQUEST
.fc-3 = UNAPPROVED DAY OFF REQUEST
.fc-4 = SIGN OUT

  • slots:

A count of the amount of assignments this shift can/should have.

  • assignments:

An array of objects containing information about the shift assignment and it's assignee.

##Adding Events .fullCalendar( 'renderEvent', event [, stick ] ) renders a new event on the calendar. The event must be an Event Object with a title and start at the very least. Normally, the event will disappear once the calendar refetches its event sources (example: when prev/next is clicked). However, specifying stick as true will cause the event to be permanently fixed to the calendar.

##Removing Events

##Filtering Events

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