function Calendar(element) {
      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;

      _classCallCheck(this, Calendar);

      _defineProperty(this, "element", void 0);

      _defineProperty(this, "options", void 0);

      _defineProperty(this, "_startDate", void 0);

      _defineProperty(this, "_dataSource", void 0);

      _defineProperty(this, "_mouseDown", void 0);

      _defineProperty(this, "_rangeStart", void 0);

      _defineProperty(this, "_rangeEnd", void 0);

      _defineProperty(this, "_responsiveInterval", void 0);

      _defineProperty(this, "_nbCols", void 0);

      _defineProperty(this, "clickDay", void 0);

      _defineProperty(this, "dayContextMenu", void 0);

      _defineProperty(this, "mouseOnDay", void 0);

      _defineProperty(this, "mouseOutDay", void 0);

      _defineProperty(this, "renderEnd", void 0);

      _defineProperty(this, "selectRange", void 0);

      _defineProperty(this, "yearChanged", void 0);

      _defineProperty(this, "periodChanged", void 0);

      if (element instanceof HTMLElement) {
        this.element = element;
      } else if (typeof element === "string") {
        this.element = document.querySelector(element);
      } else {
        throw new Error("The element parameter should be a DOM node or a selector");
      }

      this.element.classList.add('calendar');

      this._initializeEvents(options);

      this._initializeOptions(options);

      var startYear = new Date().getFullYear();
      var startMonth = 0;

      if (this.options.startDate) {
        startYear = this.options.startDate.getFullYear();
        startMonth = this.options.startDate.getMonth();
      } else if (this.options.startYear) {
        startYear = this.options.startYear;
      }

      this.setStartDate(new Date(startYear, startMonth, 1));
    }
Create a new calendar.
@param element The element (or the selector to an element) in which the calendar should be created.
@param options [Optional] The options used to customize the calendar