var defaultTheme = getRandom(4);
var today = new Date();
var events = [ {
id: "imwyx6S",
name: "Event #3",
description: "Lorem ipsum dolor sit amet.",
date: today.getMonth() + 1 + "/18/" + today.getFullYear(),
type: "event"
}, {
id: "9jU6g6f",
name: "Holiday #1",
description: "Lorem ipsum dolor sit amet.",
date: today.getMonth() + 1 + "/10/" + today.getFullYear(),
type: "holiday"
}, {
id: "0g5G6ja",
name: "Event #1",
description: "Lorem ipsum dolor sit amet.",
date: [ today.getMonth() + 1 + "/2/" + today.getFullYear(), today.getMonth() + 1 + "/5/" + today.getFullYear() ],
type: "event",
everyYear: !0
}, {
id: "y2u7UaF",
name: "Holiday #3",
description: "Lorem ipsum dolor sit amet.",
date: today.getMonth() + 1 + "/23/" + today.getFullYear(),
type: "holiday"
}, {
id: "dsu7HUc",
name: "Birthday #1",
description: "Lorem ipsum dolor sit amet.",
date: new Date(),
type: "birthday"
}, {
id: "dsu7HUc",
name: "Birthday #2",
description: "Lorem ipsum dolor sit amet.",
date: today.getMonth() + 1 + "/27/" + today.getFullYear(),
type: "birthday"
} ];
var active_events = [];
var week_date = [];
var curAdd, curRmv;
function getRandom(a) {
return Math.floor(Math.random() * a);
}
function getWeeksInMonth(a, b) {
var c = [], d = new Date(b, a, 1), e = new Date(b, a + 1, 0), f = e.getDate();
var g = 1;
var h = 7 - d.getDay();
while (g <= f) {
c.push({
start: g,
end: h
});
g = h + 1;
h += 7;
if (h > f) h = f;
}
return c;
}
week_date = getWeeksInMonth(today.getMonth(), today.getFullYear())[2];
/*{
id: "sKn89hi",
name: "1pm",
description: "",
badge: "5-day event",
date: [ today.getMonth() + 1 + "/" + week_date.start + "/" + today.getFullYear(), today.getMonth() + 1 + "/" + week_date.end + "/" + today.getFullYear() ],
type: "event",
everyYear: !0
},*/
$(document).ready(function() {
$("#demoEvoCalendar").evoCalendar({
format: "MM dd, yyyy",
titleFormat: "MM",
calendarEvents: [{
id: "in8bha2",
name: "10:30am",
description: "online webinar(zoom/google-meet)",
badge: "confirm",
date: [ "2023-06-21" ],
type: "birthday "
},{
id: "in8bha3",
name: "5:00pm",
description: "open for call",
badge: "confirm",
date: [ "2023-06-21" ],
type: "event "
},{
id: "in8bha4",
name: "5:00pm",
description: "open for call",
badge: "confirm",
date: [ "2023-06-22" ],
type: "event "
},{
id: "in8bha10",
name: "5:00pm",
description: "open for call",
badge: "confirm",
date: [ "2023-06-28" ],
type: "event "
},{
id: "in8bha11",
name: "10:30am",
description: "online webinar(zoom/google-meet)",
badge: "confirm",
date: [ "2023-06-26" ],
type: "birthday "
},{
id: "in8bha12",
name: "10:30am",
description: "online webinar(zoom/google-meet)",
badge: "confirm",
date: [ "2023-06-22" ],
type: "birthday "
},{
id: "in8bha17",
name: "10:30am",
description: "open for call",
badge: "confirm",
date: [ "2023-06-23" ],
type: "event "
},{
id: "in8bha18",
name: "5:00pm",
description: "open for call",
badge: "confirm",
date: [ "2023-06-27" ],
type: "event "
},{
id: "in8bha19",
name: "10:30am",
description: "online webinar(zoom/google-meet)",
badge: "confirm",
date: [ "2023-06-23" ],
type: "birthday "
},{
id: "in8bha20",
name: "10:30am",
description: "online webinar(zoom/google-meet)",
badge: "confirm",
date: [ "2023-06-27" ],
type: "birthday "
},{
id: "in8bha21",
name: "5:00pm",
description: "open for call",
badge: "confirm",
date: [ "2023-06-30" ],
type: "event "
},{
id: "in8bha22",
name: "5:00pm",
description: "open for call",
badge: "confirm",
date: [ "2023-06-29" ],
type: "event "
},{
id: "in8bha23",
name: "10:30am",
description: "meetup within cebu",
badge: "confirm",
date: [ "2023-06-24" ],
type: "holiday "
},{
id: "in8bha24",
name: "5:00pm",
description: "open for call",
badge: "confirm",
date: [ "2023-06-26" ],
type: "event "
},{
id: "in8bha25",
name: "1:30pm",
description: "meetup within cebu",
badge: "confirm",
date: [ "2023-07-01" ],
type: "holiday "
},{
id: "in8bha26",
name: "5:00pm",
description: "open for call",
badge: "confirm",
date: [ "2023-07-03" ],
type: "event "
},{
id: "in8bha27",
name: "5:00pm",
description: "open for call",
badge: "confirm",
date: [ "2023-06-19" ],
type: "event "
},{
id: "in8bha28",
name: "10:30am",
description: "online webinar(zoom/google-meet)",
badge: "confirm",
date: [ "2023-06-19" ],
type: "birthday "
},{
id: "in8bha29",
name: "10:30am",
description: "online webinar(zoom/google-meet)",
badge: "confirm",
date: [ "2023-06-20" ],
type: "birthday "
},{
id: "in8bha30",
name: "5:00pm",
description: "open for call",
badge: "confirm",
date: [ "2023-06-20" ],
type: "event "
},]
});
$("[data-set-theme]").click(function(b) {
a(b.target);
});
$("#addBtn").click(function(a) {
curAdd = getRandom(events.length);
$("#demoEvoCalendar").evoCalendar("addCalendarEvent", events[curAdd]);
active_events.push(events[curAdd]);
events.splice(curAdd, 1);
if (0 === events.length) a.target.disabled = !0;
if (active_events.length > 0) $("#removeBtn").prop("disabled", !1);
});
$("#removeBtn").click(function(a) {
curRmv = getRandom(active_events.length);
$("#demoEvoCalendar").evoCalendar("removeCalendarEvent", active_events[curRmv].id);
events.push(active_events[curRmv]);
active_events.splice(curRmv, 1);
if (0 === active_events.length) a.target.disabled = !0;
if (events.length > 0) $("#addBtn").prop("disabled", !1);
});
a($("[data-set-theme]")[defaultTheme]);
function a(a) {
var b = a.dataset.setTheme;
$("[data-set-theme]").removeClass("active");
$(a).addClass("active");
$("#demoEvoCalendar").evoCalendar("setTheme", b);
}
var b = getRandom($("[data-settings]").length);
var c = $("[data-settings]")[b];
var d = getRandom($("[data-method]").length);
var e = $("[data-method]")[d];
var f = getRandom($("[data-event]").length);
var g = $("[data-event]")[f];
showSettingsSample($(c).data().settings);
showMethodSample($(e).data().method);
showEventSample($(g).data().event);
$("[data-settings]").on("click", function(a) {
var b = $(a.target).closest("[data-settings]");
var c = b.data().settings;
showSettingsSample(c);
});
$("[data-method]").on("click", function(a) {
var b = $(a.target).closest("[data-method]");
var c = b.data().method;
showMethodSample(c);
});
$("[data-event]").on("click", function(a) {
var b = $(a.target).closest("[data-event]");
var c = b.data().event;
showEventSample(c);
});
});
function showSettingsSample(a) {
$("#demoEvoCalendar").removeClass("event-hide");
$(".event-header").html("");
var b = $("#event-settings");
var c;
switch (a) {
case "theme":
c = '
// theme
' + '$(\'#calendar\').evoCalendar({
' + " 'theme': 'Theme Name'
" + "});" + "
";
break;
case "language":
c = '
// language
' + '$(\'#calendar\').evoCalendar({
' + " 'language': 'en'
" + ' // Supported language: en, es, de..
' + "});" + "
";
break;
case "format":
c = '
// format
' + '$(\'#calendar\').evoCalendar({
' + " 'format': 'MM dd, yyyy'
" + ' // some browsers doesn\'t support other format, so...
' + "});" + "
";
break;
case "titleFormat":
c = '
// titleFormat
' + '$(\'#calendar\').evoCalendar({
' + " 'titleFormat': 'MM'
" + "});" + "
";
break;
case "eventHeaderFormat":
c = '
// eventHeaderFormat
' + '$(\'#calendar\').evoCalendar({
' + " 'eventHeaderFormat': 'MM dd'
" + "});" + "
";
break;
case "firstDayOfWeek":
c = '
// firstDayOfWeek
' + '$(\'#calendar\').evoCalendar({
' + ' \'firstDayOfWeek\': 0 // Sun
' + ' // 0-6 (Sun-Sat)
' + "});" + "
";
break;
case "todayHighlight":
c = '
// todayHighlight
' + '$(\'#calendar\').evoCalendar({
' + ' \'todayHighlight\': true
' + "});" + "
";
break;
case "sidebarDisplayDefault":
c = '
// sidebarDisplayDefault
' + '$(\'#calendar\').evoCalendar({
' + ' \'sidebarDisplayDefault\': false
' + "});" + "
";
break;
case "sidebarToggler":
c = '
// sidebarToggler
' + '$(\'#calendar\').evoCalendar({
' + ' \'sidebarToggler\': false
' + "});" + "
";
break;
case "eventDisplayDefault":
c = '
// eventDisplayDefault
' + '$(\'#calendar\').evoCalendar({
' + ' \'eventDisplayDefault\': false
' + "});" + "
";
break;
case "eventListToggler":
c = '
// eventListToggler
' + '$(\'#calendar\').evoCalendar({
' + ' \'eventListToggler\': false
' + "});" + "
";
break;
case "calendarEvents":
c = '
// calendarEvents
' + '$(\'#calendar\').evoCalendar(\'calendarEvents\', {
' + " 'calendarEvents': [
" + " {
" + ' id: \'4hducye\', // Event\'s id (required, for removing event)
' + ' description: \'Lorem ipsum dolor sit amet..\', // Description of event (optional)
' + ' badge: \'1-day event\', // Event badge (optional)
' + ' date: new Date(), // Date of event
' + ' type: \'holiday\', // Type of event (event|holiday|birthday)
' + ' color: \'#63d867\', // Event custom color (optional)
' + ' everyYear: true // Event is every year (optional)
' + " }
" + " ]
" + "});" + "
";
}
$("[data-settings]").removeClass("active");
$('[data-settings="' + a + '"]').addClass("active");
b.html(c);
//var signupform='FULLNAME:
MOBILE:
EMAIL:
';
//var emptyget = $(".event-list").html();
// alert(emptyget);
var signupform='
No time scheduled for this day.. :)
"){ $(".event-header").html(signupform+contentget); //} } function showMethodSample(a) { var b = $("#method-code"); var c; switch (a) { case "setTheme": c = '