this is the code i use in angular
calendarOptions: CalendarOptions = {
plugins: [ dayGridPlugin, timeGridPlugin, listPlugin ],
initialView: 'dayGridMonth',
headerToolbar: {
left: 'prev today next',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listMonth'
},
weekends: true,
events: [],
locale:'vi',
dayMaxEvents: true,
selectable: true,
editable: true,selectMirror: true,
select: function(info) {
alert('selected ' + info.startStr + ' to ' + info.endStr);
console.log("mạnh đã ở đây")
},
dateClick: function(arg){
alert('date click');
}
Error : Type '{ plugins: PluginDef[]; initialView: string; headerToolbar: { left: string; center: string; right: string; }; weekends: true; events: undefined[]; locale: string; dayMaxEvents: true; selectable: true; editable: true; selectMirror: true; select: (info: DateSelectArg) => void; dateClick: (arg: any) => void; }' is not assignable to type 'CalendarOptions'. Object literal may only specify known properties, and 'dateClick' does not exist in type 'CalendarOptions'.ts(2322)
Can anyone help me to solve this problem? please
My problem was solved as follows:
import interactionPlugin from '@fullcalendar/interaction';