Parcourir la source

background events example

Adam Shaw il y a 11 ans
Parent
commit
f8f894b200
1 fichiers modifiés avec 101 ajouts et 0 suppressions
  1. 101 0
      demos/background-events.html

+ 101 - 0
demos/background-events.html

@@ -0,0 +1,101 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset='utf-8' />
+<link href='../dist/fullcalendar.css' rel='stylesheet' />
+<link href='../dist/fullcalendar.print.css' rel='stylesheet' media='print' />
+<script src='../lib/moment/moment.js'></script>
+<script src='../lib/jquery/dist/jquery.js'></script>
+<script src='../dist/fullcalendar.js'></script>
+<script>
+
+	$(document).ready(function() {
+
+		$('#calendar').fullCalendar({
+			header: {
+				left: 'prev,next today',
+				center: 'title',
+				right: 'month,agendaWeek,agendaDay'
+			},
+			defaultDate: '2014-11-12',
+			businessHours: true, // display business hours
+			editable: true,
+			events: [
+				{
+					title: 'Business Lunch',
+					start: '2014-11-03T13:00:00',
+					constraint: 'businessHours'
+				},
+				{
+					title: 'Meeting',
+					start: '2014-11-13T11:00:00',
+					constraint: 'availableForMeeting', // defined below
+					color: '#257e4a'
+				},
+				{
+					title: 'Conference',
+					start: '2014-11-18',
+					end: '2014-11-20'
+				},
+				{
+					title: 'Party',
+					start: '2014-11-29T20:00:00'
+				},
+
+				// areas where "Meeting" must be dropped
+				{
+					id: 'availableForMeeting',
+					start: '2014-11-11T10:00:00',
+					end: '2014-11-11T16:00:00',
+					rendering: 'background'
+				},
+				{
+					id: 'availableForMeeting',
+					start: '2014-11-13T10:00:00',
+					end: '2014-11-13T16:00:00',
+					rendering: 'background'
+				},
+
+				// red areas where no events can be dropped
+				{
+					start: '2014-11-24',
+					end: '2014-11-28',
+					overlap: false,
+					rendering: 'background',
+					color: '#ff9f89'
+				},
+				{
+					start: '2014-11-06',
+					end: '2014-11-08',
+					overlap: false,
+					rendering: 'background',
+					color: '#ff9f89'
+				}
+			]
+		});
+		
+	});
+
+</script>
+<style>
+
+	body {
+		margin: 40px 10px;
+		padding: 0;
+		font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
+		font-size: 14px;
+	}
+
+	#calendar {
+		max-width: 900px;
+		margin: 0 auto;
+	}
+
+</style>
+</head>
+<body>
+
+	<div id='calendar'></div>
+
+</body>
+</html>