<script type="module">
document.addEventListener('DOMContentLoaded',function(){
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl , {
initialView: 'dayGridMonth',
initialDate: new Date(),
headerToolbar: {
left: 'prev,next,today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay',
},
dateClick: function(info){
console.log(info);
initializeStartDateEndDateFormat('Y-m-d',true);
$('#exampleModal').modal('show');
},
});
calendar.render();
});
function initializeStartDateEndDateFormat(format, allDay){
let timePicker = !allDay;
$('#startDateTime').datetimepicker({
format : format,
timepicker:timePicker
});
$('#endDateTime').datetimepicker({
format : format,
timepicker:timePicker
});
}
</script>
this is the code i wrote and cdn is perfect but still this error arises can't understand what the issue is.
bootstrap-datetimepicker.min.js
filename), you're using this plugin but think you're using this plugin. They are not the same. Follow the docs for the plugin you're actually using