jQuery Fullcalendar Integration with example

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..

  1. <!DOCTYPEhtml>
  2. <html>
  3. <head>
  4. <title>jQuery Fullcalendar Integration with example</title>
  5. <linkhref="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.3.0/fullcalendar.min.css"rel="stylesheet"/>
  6. <linkhref="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.3.0/fullcalendar.print.css"rel="stylesheet"media="print"/>
  7. <scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
  8. <scriptsrc="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
  9. <scriptsrc="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.3.0/fullcalendar.min.js"></script>
  10. </head>
  11. <body>
  12. <divid="calendar"></div>
  13. <scripttype="text/javascript">    
  14. $(document).ready(function(){
  15. var calendar = $("#calendar").fullCalendar({
  16. header: {
  17.                 left: 'prev,next today',
  18.                 center: 'title',
  19.                 right: 'month,agendaWeek,agendaDay,listWeek'
  20.             },
  21.             navLinks: true,
  22.             editable: true,
  23.             eventLimit: true,
  24. events: [
  25.          {
  26.          title : 'event1',
  27.          start : '2017-04-01'
  28.          },
  29.          {
  30.          title : 'event2',
  31.          start : '2017-04-03',
  32.          end : '2017-04-05'
  33.          },
  34.          {
  35.          title : 'event3',
  36.          start : '2017-04-09T12:30:00',
  37.          allDay : false // will make the time show
  38.          }
  39.         ], // request to load current events
  40. });
  41. });
  42. </script>
  43. </body>
  44. </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 :

  1. $('#calendar').fullCalendar({
  2. events:'/events.php'
  3. });
$('#calendar').fullCalendar({
    events: '/events.php'
});


If you want to know more about events of fullcalendar then follow this url : fullcalendar.io

Label :

HTML

jQuery

How To

Web Development

JavaScript

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

For More Info See :: laravel And github

Leave a Comment

Your email address will not be published. Required fields are marked *

  +  47  =  56

We're accepting well-written guest posts and this is a great opportunity to collaborate : Contact US