javascript:
Код: Выделить всё
document.addEventListener('DOMContentLoaded', function() {
const calOpts = {
locale: 'et',
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()
})
Код: Выделить всё
Пн, 30 декабря 2024 г., 09:30:00 GMT+0200 (Ida) -Европейский стандартaeg)
. Контроллер .NET 9 MVC анализирует его, используя
Код: Выделить всё
[HttpPost]
public async Task Kinnitatud(string start) {
DateTime algus = DateTimeOffset.Parse(start).UtcDateTime;
}
Код: Выделить всё
String 'Mon Dec 30 2024 09:30:00 GMT+0200 (Ida-Euroopa standardaeg)' was not recognized as a valid DateTime.
Подробнее здесь: https://stackoverflow.com/questions/793 ... to-c-sharp