javascript:
Код: Выделить всё
document.addEventListener('DOMContentLoaded', function() {
const calOpts = {
locale: 'ee',
slotDuration: '00:15:00',
slotLabelInterval: '00:15',
allDaySlot: false,
selectConstraint: 'businessHours',
select : function( selectionInfo ) {
document.getElementById('start').value = selectionInfo.start
},
selectable: true,
events: { url: 'api/fullcalendar' }
}
const calendarEl = document.getElementById('calendar')
calendar = new FullCalendar.Calendar(calendarEl, calOpts)
calendar.render()
})
Код: Выделить всё
Также он может выбрать событие, перетащив его на время больше или меньше 1,5 часов.
Как отключить такой выбор, чтобы пользователь мог выбирать только 1,5-часовое событие в зоне свободного времени?
Бета-версия Fullcalendar 7 используется в ASP.NET 9 MVC просмотреть.
Подробнее здесь: https://stackoverflow.com/questions/793 ... llcalendar
Мобильная версия