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
489 stars 34 forks source link

May the doc be wrong? #146

Closed luisesn closed 1 year ago

luisesn commented 1 year ago

After using the example code:

  var calendarElement = document.getElementById( "calendar" );
  var calendarInstance2 = calendarJs( calendarElement, {
    manualEditingEnabled: true
    // All your options can be set here
  } ); 

calendarInstance2 is undefined

It works by using "new"

  var calendarElement = document.getElementById( "calendar" );
  var calendarInstance2 = new calendarJs( calendarElement, {
    manualEditingEnabled: true
    // All your options can be set here
  } ); 
williamtroup commented 1 year ago

Hi,

Thank you for letting me know. Will get this updated for the next release.

williamtroup commented 1 year ago

I've just released v2.3.3, which contains the documentation fixes.

Thanks for the report!

Don't forget to Star and Share the project!