williamtroup / Calendar.js

📅 A javascript drag & drop event calendar, that is fully responsive and compatible with all modern browsers.
https://calendar-js.com
MIT License
478 stars 33 forks source link

Some custom triggers not firing #215

Closed mrussojr closed 6 months ago

mrussojr commented 6 months ago

Describe the bug A clear and concise description of what the bug is. The onPreviousYear, onNextYear, and onSetDate custom triggers are not firing as expected when using those functions within the calendar. Fiddle example of basic calendar with custom triggers defined https://jsfiddle.net/mrussojr/u8mogrvk/.

To Reproduce Steps to reproduce the behavior:

  1. Create basic calendar instance with options set for onSetDate, onNextYear, and onPreviousYear custom triggers that will log date to console
  2. Click on 'Jump to Date', enter date to jump to, and click 'Go'
  3. Click on 'View Full Year' button to show full year view
  4. Click on 'Next Year' button to go to next year and fire custom trigger
  5. Click on 'Previous Year' button to go to previous year and fire custom trigger
  6. View console to see that output is not there for any of the custom triggers

Expected behavior Expected that the custom trigger defined in the option to fire, in the most basic example, to write output to the console.

Screenshots No screenshots, but behavior is replicable in the fiddle above.

Desktop (please complete the following information):

williamtroup commented 6 months ago

Step 2 is an issue, and will be fixed in the next release. As you are using a view, the other two will not get triggered, as the main date display is the Full Month view as not changed. This is going to be changed in v3.0.0 and the view date is unified.

williamtroup commented 6 months ago

v2.10.11 has been released, which fixes the Stp 2 issue you raised.