jQuery Fullcalendar Integration with example
In this post we will give you information about jQuery Fullcalendar Integration with example. Hear we will give you detail about jQuery Fullcalendar Integration with exampleAnd how to use it also give you demo for it if it is necessary.
In this post, I will let you know how to implement full calendar integration with example.
You can also perform some basic crud operation such as you can add events for a particular date.
You can pass json type of data or array type of data in events to display the calendar.
If you need to display the data from server then pass the url in “events” key.
You can display the events based on date range. This is useful for appointment booking, event scheduling etc..
- <!DOCTYPEhtml>
- <html>
- <head>
- <title>jQuery Fullcalendar Integration with example</title>
- <linkhref="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.3.0/fullcalendar.min.css"rel="stylesheet"/>
- <linkhref="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.3.0/fullcalendar.print.css"rel="stylesheet"media="print"/>
- <scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
- <scriptsrc="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
- <scriptsrc="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.3.0/fullcalendar.min.js"></script>
- </head>
- <body>
- <divid="calendar"></div>
- <scripttype="text/javascript">
- $(document).ready(function(){
- var calendar = $("#calendar").fullCalendar({
- header: {
- left: 'prev,next today',
- center: 'title',
- right: 'month,agendaWeek,agendaDay,listWeek'
- },
- navLinks: true,
- editable: true,
- eventLimit: true,
- events: [
- {
- title : 'event1',
- start : '2017-04-01'
- },
- {
- title : 'event2',
- start : '2017-04-03',
- end : '2017-04-05'
- },
- {
- title : 'event3',
- start : '2017-04-09T12:30:00',
- allDay : false // will make the time show
- }
- ], // request to load current events
- });
- });
- </script>
- </body>
- </html>
<!DOCTYPE html> <html> <head> <title>jQuery Fullcalendar Integration with example</title> <link href="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.3.0/fullcalendar.min.css" rel="stylesheet"/> <link href="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.3.0/fullcalendar.print.css" rel="stylesheet" media="print" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.3.0/fullcalendar.min.js"></script> </head> <body> <div id="calendar"></div> <script type="text/javascript"> $(document).ready(function(){ var calendar = $("#calendar").fullCalendar({ header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay,listWeek' }, navLinks: true, editable: true, eventLimit: true, events: [ { title : 'event1', start : '2017-04-01' }, { title : 'event2', start : '2017-04-03', end : '2017-04-05' }, { title : 'event3', start : '2017-04-09T12:30:00', allDay : false // will make the time show } ], // request to load current events }); }); </script> </body> </html>
If you do not pass the media attribute in fullcalendar.print.css
library then you won’t be able to see the prev and next button on fullcalendar header toolbar.
If you need to get data from server then you can pass the url in following way :
If you want to know more about events of fullcalendar then follow this url : fullcalendar.io
Hope this code and post will helped you for implement jQuery Fullcalendar Integration with example. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs