Calendar
Pages calendar plugin is exclusive only on pages and is not a third party plugin. The horizontal scrolling helps it to fit easily on to small screens and user experience is seamless across all platforms. It supports many features including multiple languages and timezones
How to Setup
Dependencies
Pages Calendar Lib
HTML Source
Inlcude the following HTML source to your file, you can remove the compontents you do not need to have
Initialize Pages Calendar
To initialize pages calendar with default setting use the following code
Calendar Settings and Callbacks
Sample JSON Event Object
Public Methods
Rebuild your calendar
Set date to current date
Next Month
Previous Month
Parse in the date string to set a date to the calendar, it will accept any standard date formate
You can get the current date of the calendar and also pass in the required date formate to get the the desire formate output
example : $('#my_calendar_elment').pagescalendar('getDate','dd/mm/yyyy');
It will accept any date formate string
To render the calendar
Change langues
Reload and draw events for the particular view.
Adding an event to the calendar using the even object varriable, demostrated in demos/assets/js/calendar.js
Add a batch of events at once.
Removing an event also demonstrated in : demos/assets/js/calendar.js
This method will remove all events in your array
Editing an event to the calendar using the even object variable, demonstrated in demos/assets/js/calendar.js
Will get you all the events in your calendar array
You can set the view / You can change your view to : "month" & " week"
Display the view type that is currently loaded : "month" or " week"
Will display start and end date of the current view
Will display start and end date of the current view
You can set state mannually when you need to, there are two states "loading" and "loaded", This will help you to show a progressbar for lazy event fetching
You can display an error message on your calendar by passing in a string
Scroll to the first even on week and day view Settings
Callbacks
You can see a list of call back demonstrated in demo/assets/calendar.js
file
onViewRenderComplete()
On Render Complete
onEventDblClick()
Event Double Click
onEventClick(event)
Event click call back returns the clicked event details into an array, you can console.log(event)
to see all event attributes
onEventRender()
After Events are rendered to the view
onEventDragComplete()
After user drag event is completed
onEventResizeComplete()
After user resize event is completed
onTimeSlotDblClick(timeSlot)
Double click time slot on the grid, returns the date and time of the particular timeslot
onDateChange(range)
When ever the calendar's date is change, this call back will return a range, i.e: range.start and range.end both are dates
Supported Languages
Use the language code and set it to locale
LANGUAGE | CODE |
Afrikaans | af |
Albanian | sq |
Armenian | hy-am |
Azerbaijani | az |
Bahasa Indonesia | id |
Bahasa Malayu | ms-my |
Basque | eu |
Belarusian | be |
Bengali | bn |
Bosnian | bs |
Breton | br |
Bulgarian | bg |
Catalan | ca |
Chinese | zh-cn |
Chinese (Traditional) | zh-tw |
Chuvash | cv |
Croatian | hr |
Czech | cs |
Danish | da |
Dutch | nl |
English | en |
English (Australia) | en-au |
English (Canada) | en-ca |
English (England) | en-gb |
Esperanto | eo |
Estonian | et |
Farose | fo |
Finnish | fi |
French | fr |
French (Canada) | fr-ca |
Galician | gl |
Georgian | ka |
German | de |
German (Austria) | de-at |
Greek | el |
Hebrew | he |
Hungarian | hu |
Icelandic | is |
Italian | it |
Japanese | ja |
Khmer (Cambodia) | km |
Korean | ko |
Latvian | lv |
Lithuanian | lt |
Luxembourgish | lb |
Macedonian | mk |
Malayalam | ml |
Norwegian | nb |
Norwegian Nynorsk | nn |
Polish | pl |
Portuguese | pt |
Portuguese (Brazil) | pt-br |
Romanian | ro |
Russian | ru |
Serbian | sr |
Serbian Cyrillic | sr-cyrl |
Slovak | sk |
Slovenian | sl |
Spanish | es |
Swedish | sv |
Tagalog (Filipino) | tl-ph |
Tamaziɣt | tzm |
Tamaziɣt Latin | tzm-latn |
Tamil | ta |
Thai | th |
Turkish | tr |
Ukrainian | uk |
Uzbek | uz |
Vietnamese | vi |
Welsh | cy |
For help and bug report please contact support@revox.io
Last updated