import "./ssvf-layout.js";
$(function () {
var i = $("#calendar"),
e = new Date();
i.fullCalendar({
header: {
left: "prev,next today",
center: "title",
right: "month,agendaWeek,agendaDay,listWeek"
},
eventMouseover: function (t, n, a) {
$(".fc-event-inner", this).append('
');
},
eventRender: function (t, n) {
$(n).tooltip({
title: t.title,
placement: "top",
trigger: "hover",
container: "body"
});
$(n).attr({
"role": "button",
"aria-label": t.title
});
},
eventMouseout: function (t, n, a) {
$("#" + t.id).remove();
},
defaultDate: e.getFullYear() + "/" + (e.getMonth() + 1) + "/" + e.getDate(),
editable: true,
eventLimit: true,
events: [
{
title: "All Day Event on 03.01.2022 at 5PM Eastern.",
start: "2022-03-01",
timezone: "EST",
url: "https://google.com"
},
{
title: "Long Event",
start: "2022-03-07",
end: "2022-03-10"
},
{
id: 999,
title: "Repeating Event",
start: "2022-03-15T16:00:00"
},
{
id: 999,
title: "Repeating Event",
start: "2022-03-22T16:00:00"
},
{
title: "Conference",
start: "2017-11-05",
end: "2017-11-07"
},
{
title: "Lunch",
start: "2017-11-06T12:00:00"
},
{
title: "Meeting",
start: "2017-11-06T14:30:00"
},
{
title: "Happy Hour",
start: "2017-11-06T17:30:00"
},
{
title: "Dinner",
start: "2017-11-06T20:00:00"
},
{
title: "Movie",
start: "2017-11-07T07:00:00"
},
{
title: "Click for Google",
url: "http://google.com/",
start: "2022-03-08"
}
],
viewRender: function () {
// Add aria-label to the next and previous buttons
$('.fc-prev-button').attr('aria-label', 'Previous month');
$('.fc-next-button').attr('aria-label', 'Next month');
}
});
// Initial setting of aria-labels when the calendar is first rendered
$('.fc-prev-button').attr('aria-label', 'Previous month');
$('.fc-next-button').attr('aria-label', 'Next month');
});