UNPKG

calenstyle

Version:

CalenStyle is a Responsive Drag-and-Drop Event Calendar for Web, iOS, Android & Windows. CalenStyle is customizable plugin having multiple, clean-designed event calendar templates specially designed for web & mobile applications.

124 lines (92 loc) 3.06 kB
<!DOCTYPE html> <html> <head> <title>Week View with Blocked Time</title> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <script type="text/javascript" src="js/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="js/jquery-ui-custom-1.11.2.min.js"></script> <link rel="stylesheet" type="text/css" href="css/jquery-ui-custom-1.11.2.min.css" /> <link rel="stylesheet" type="text/css" href="../src/calenstyle.css" /> <link rel="stylesheet" type="text/css" href="../src/calenstyle-jquery-ui-override.css" /> <link rel="stylesheet" type="text/css" href="../src/calenstyle-iconfont.css" /> <script type="text/javascript" src="../src/calenstyle.js"></script> <script type="text/javascript" src="js/CalJsonGenerator.js"></script> <style type="text/css"> .calendarContOuter { width: 90%; height: 600px; margin: 0px auto; font-size: 16px; } .cElemDatePicker { font-size: 14px; } </style> <script type="text/javascript"> $(function() { $(".calendarContOuter").CalenStyle( { sectionsList: ["Header", "Calendar"], visibleView: "WeekView", viewsToDisplay: [ { viewName: "DetailedMonthView", viewDisplayName: "" }, { viewName: "WeekView", viewDisplayName: "" }, { viewName: "QuickAgendaView", viewDisplayName: "" }, { viewName: "MonthView", viewDisplayName: "" } ], calDataSource: [ { sourceFetchType: "DateRange", sourceType: "FUNCTION", source: function(fetchStartDate, fetchEndDate, durationStartDate, durationEndDate, oConfig, loadViewCallback) { var calObj1 = this; calObj1.incrementDataLoadingCount(2); var oEventResponse = generateJsonEvents(fetchStartDate, fetchEndDate); if(oEventResponse != undefined) { if(oEventResponse[0]) { calObj1.parseDataSource("eventSource", oEventResponse[1], durationStartDate, durationEndDate, loadViewCallback, oConfig, false); } } var oBlockedTimeResponse = generateJsonRestrictedSection(fetchStartDate, fetchEndDate); console.log("oBlockedTimeResponse"); console.log(oBlockedTimeResponse); if(oBlockedTimeResponse != undefined) { if(oBlockedTimeResponse[0]) { calObj1.parseDataSource("restrictedSectionSource", oBlockedTimeResponse[1], durationStartDate, durationEndDate, loadViewCallback, {}, false); } } } } ], hideEventIcon: {Default: true}, isNonBusinessHoursDroppable: false, isRestrictedSectionDroppable: false }); }); </script> </head> <body> <div class="calendarContOuter"></div> </body> </html>