williamtroup/Calendar.js

May the doc be wrong?

Closed this issue · 2 comments

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
  } ); 

Hi,

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

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!