diff --git a/README.md b/README.md index 7bf5879..0ed0be5 100644 --- a/README.md +++ b/README.md @@ -1 +1,79 @@ -# Full Calendar(Salesforce) \ No newline at end of file +# Full Calendar(Salesforce) 📅📆 +*FullCalendar V4* + +Provides a ```false``` that loads the FullCalendar static resources and displays a calendar. This component is capable of rendering events on any custom object along with standard objects like ```event```. + +## Public Methods +```setEvents``` is a public method that takes in formatted events, and renders them to the calendar. By defualt the function will remove the current events and render the new ones. +```ruby + @api setEvents(events) +``` + +## Views +The calendar provides multiple views in order to display the events. + +The initial view is ```dayGridMonth```; views provided are ```['listWeek', 'dayGridMonth', 'timeGridWeek', 'timeGridDay'] ```. + +Examples of each view are provided below: + +
+ + listWeek + + +
+ +
+ + dayGridMonth + + +
+ +
+ + timeGridWeek + + +
+ +
+ + timeGridDay + + +
+ +## Events +### Date Change +As you navigate between dates (months, weeks, days; based on the current view) an event is dispatched everytime the viewed dates change with the start and end of the viewable calender. ```'datechange'``` + +```ruby +this.event('datechange', { startDate, endDate }) +``` +___ +### Event Click +When clicking an event on the calendar from any view, an event is dispatched with an ```info``` object with data about the event. ```'fceventclick'``` + +```ruby +this.event('fceventclick', info) +``` +___ +### Date Click +When a date is clicked on the calendar, an event is dispatched with an ```info``` object with data about the date. ```'fcdateclick'``` + +```ruby +this.event('fcdateclick', info) +``` + +### Mouse Enter +Triggered when the user mouses over an event. An event is dispatched with an ```info``` object with data about the event. ```'eventmouseenter'``` + +```ruby +this.event('eventmouseenter', info) +``` + + + + +