Monday, May 20, 2024
178
rated 0 times [  184] [ 6]  / answers: 1 / hits: 19889  / 7 Years ago, tue, september 12, 2017, 12:00:00

I am trying to build an application that creates events within fullcalendar. I don't allow user to create an allDay event at all at the client side but they still can see it within the view. Is there any method to remove allDays from views completely?



function initCalendar {
if (!jQuery().fullCalendar) {
return;
}

var date = new Date(),
started,
ended

var header = {};

var calendar = $('#calendar').fullCalendar({
header: header,
selectable: true,
selectHelper: true,

select: function (start, end, allDay) {
$('#fc_create').click();
var dateStart = start;
var dateEnd = end;

$(.antosubmit).on(click, function() {
var title = $(#reservation-title).val();

if (title) {
var event = {
editable: true,
title: title,
start: dateStart,
end: dateEnd,
allDay: false
}

calendar.fullCalendar('renderEvent', event, true);
calendar.fullCalendar('unselect');
#('.antoclose').click();

return false;
}
else {
////alert here
}
})
}
})
}

More From » fullcalendar

 Answers
57
[#56506] Saturday, September 9, 2017, 7 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
malaysias

Total Points: 619
Total Questions: 110
Total Answers: 107

Location: Czech Republic
Member since Thu, Aug 11, 2022
2 Years ago
;