lbertenasco / ap-ng2-fullcalendar

Angular2 fullcalendar component
MIT License
35 stars 18 forks source link

Select not working #35

Closed KyDenZ closed 7 years ago

KyDenZ commented 7 years ago

Hello

The select option is triggered at the start of the component but does not unlock at the time of selection in the calendar

Thanks

lbertenasco commented 7 years ago

Hi @KyDenZ ! Could you add a code example showcasing the issue?

KyDenZ commented 7 years ago

Yes, here is the code :

calendarOptions: any = {
    locale: 'fr',
    defaultView: 'agendaWeek',
    timezone: 'local',
    height: 'auto',
    fixedWeekCount: false,
    defaultDate: '2017-08-12',
    buttonIcons: false, // show the prev/next text
    weekNumbers: true,
    navLinks: true, // can click day/week names to navigate views
    editable: true,
    eventLimit: true, // allow "more" link when too many events
    events: [],
    select: (start, end, allDay) => {
      console.log("test");
    },
    defaultEventMinutes: 120,
    axisFormat: 'HH:mm',
    minTime: 0
  };

The console log is shown once only when the page loads, but when I click on an hour I do not have an event that is created. Otherwise the other functions works well

thanks

lbertenasco commented 7 years ago

Try with eventClick callback instead of select. Or read the Fullcalendar Docs for more info