How to use the @fullcalendar/core.findElements function in @fullcalendar/core

To help you get started, we’ve selected a few @fullcalendar/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github avpeery / Moon-Phase-Tracker / static / fullcalendar / packages / daygrid / main.esm.js View on Github external
DayGrid.prototype._renderCells = function (cells, isRigid) {
        var _a = this, view = _a.view, dateEnv = _a.dateEnv;
        var _b = this, rowCnt = _b.rowCnt, colCnt = _b.colCnt;
        var html = '';
        var row;
        var col;
        for (row = 0; row < rowCnt; row++) {
            html += this.renderDayRowHtml(row, isRigid);
        }
        this.el.innerHTML = html;
        this.rowEls = findElements(this.el, '.fc-row');
        this.cellEls = findElements(this.el, '.fc-day, .fc-disabled-day');
        if (this.isRtl) {
            this.cellEls.reverse();
        }
        this.rowPositions = new PositionCache(this.el, this.rowEls, false, true // vertical
        );
        this.colPositions = new PositionCache(this.el, this.cellEls.slice(0, colCnt), // only the first row
        true, false // horizontal
        );
        // trigger dayRender with each cell's element
        for (row = 0; row < rowCnt; row++) {
            for (col = 0; col < colCnt; col++) {
                this.publiclyTrigger('dayRender', [
                    {
                        date: dateEnv.toDate(cells[row][col].date),
                        el: this.getCellEl(row, col),
github avpeery / Moon-Phase-Tracker / static / fullcalendar / packages / timegrid / main.esm.js View on Github external
TimeGridView.prototype.updateBaseSize = function (isResize, viewHeight, isAuto) {
        var _this = this;
        var eventLimit;
        var scrollerHeight;
        var scrollbarWidths;
        // make all axis cells line up
        this.axisWidth = matchCellWidths(findElements(this.el, '.fc-axis'));
        // hack to give the view some height prior to timeGrid's columns being rendered
        // TODO: separate setting height from scroller VS timeGrid.
        if (!this.timeGrid.colEls) {
            if (!isAuto) {
                scrollerHeight = this.computeScrollerHeight(viewHeight);
                this.scroller.setHeight(scrollerHeight);
            }
            return;
        }
        // set of fake row elements that must compensate when scroller has scrollbars
        var noScrollRowEls = findElements(this.el, '.fc-row').filter(function (node) {
            return !_this.scroller.el.contains(node);
        });
        // reset all dimensions back to the original state
        this.timeGrid.bottomRuleEl.style.display = 'none'; // will be shown later if this <hr> is necessary
        this.scroller.clear(); // sets height to 'auto' and clears overflow
github fullcalendar / fullcalendar / packages / daygrid / src / AbstractDayGridView.ts View on Github external
let scrollbarWidths

    // hack to give the view some height prior to dayGrid's columns being rendered
    // TODO: separate setting height from scroller VS dayGrid.
    if (!dayGrid.rowEls) {
      if (!isAuto) {
        scrollerHeight = this.computeScrollerHeight(viewHeight)
        this.scroller.setHeight(scrollerHeight)
      }
      return
    }

    if (this.colWeekNumbersVisible) {
      // Make sure all week number cells running down the side have the same width.
      this.weekNumberWidth = matchCellWidths(
        findElements(this.el, '.fc-week-number')
      )
    }

    // reset all heights to be natural
    this.scroller.clear()
    if (headRowEl) {
      uncompensateScroll(headRowEl)
    }

    dayGrid.removeSegPopover() // kill the "more" popover if displayed

    // is the event limit a constant level number?
    if (eventLimit && typeof eventLimit === 'number') {
      dayGrid.limitRows(eventLimit) // limit the levels first so the height can redistribute after
    }
github fullcalendar / fullcalendar / packages / timegrid / src / TimeGrid.ts View on Github external
)
    }

    if (isRtl) {
      parts.reverse()
    }

    skeletonEl = this.contentSkeletonEl = htmlToElement(
      '<div class="fc-content-skeleton">' +
        '' +
          '' + parts.join('') + '' +
        '<table><tbody><tr></tr></tbody></table>' +
      '</div>'
    )

    this.colContainerEls = findElements(skeletonEl, '.fc-content-col')
    this.mirrorContainerEls = findElements(skeletonEl, '.fc-mirror-container')
    this.fgContainerEls = findElements(skeletonEl, '.fc-event-container:not(.fc-mirror-container)')
    this.bgContainerEls = findElements(skeletonEl, '.fc-bgevent-container')
    this.highlightContainerEls = findElements(skeletonEl, '.fc-highlight-container')
    this.businessContainerEls = findElements(skeletonEl, '.fc-business-container')

    if (isRtl) {
      this.colContainerEls.reverse()
      this.mirrorContainerEls.reverse()
      this.fgContainerEls.reverse()
      this.bgContainerEls.reverse()
      this.highlightContainerEls.reverse()
      this.businessContainerEls.reverse()
    }

    this.el.appendChild(skeletonEl)
github fullcalendar / fullcalendar / packages / timegrid / src / TimeGrid.ts View on Github external
}

    skeletonEl = this.contentSkeletonEl = htmlToElement(
      '<div class="fc-content-skeleton">' +
        '' +
          '' + parts.join('') + '' +
        '<table><tbody><tr></tr></tbody></table>' +
      '</div>'
    )

    this.colContainerEls = findElements(skeletonEl, '.fc-content-col')
    this.mirrorContainerEls = findElements(skeletonEl, '.fc-mirror-container')
    this.fgContainerEls = findElements(skeletonEl, '.fc-event-container:not(.fc-mirror-container)')
    this.bgContainerEls = findElements(skeletonEl, '.fc-bgevent-container')
    this.highlightContainerEls = findElements(skeletonEl, '.fc-highlight-container')
    this.businessContainerEls = findElements(skeletonEl, '.fc-business-container')

    if (isRtl) {
      this.colContainerEls.reverse()
      this.mirrorContainerEls.reverse()
      this.fgContainerEls.reverse()
      this.bgContainerEls.reverse()
      this.highlightContainerEls.reverse()
      this.businessContainerEls.reverse()
    }

    this.el.appendChild(skeletonEl)
  }
github fullcalendar / fullcalendar / packages / timegrid / src / TimeGrid.ts View on Github external
}

    if (isRtl) {
      parts.reverse()
    }

    skeletonEl = this.contentSkeletonEl = htmlToElement(
      '<div class="fc-content-skeleton">' +
        '' +
          '' + parts.join('') + '' +
        '<table><tbody><tr></tr></tbody></table>' +
      '</div>'
    )

    this.colContainerEls = findElements(skeletonEl, '.fc-content-col')
    this.mirrorContainerEls = findElements(skeletonEl, '.fc-mirror-container')
    this.fgContainerEls = findElements(skeletonEl, '.fc-event-container:not(.fc-mirror-container)')
    this.bgContainerEls = findElements(skeletonEl, '.fc-bgevent-container')
    this.highlightContainerEls = findElements(skeletonEl, '.fc-highlight-container')
    this.businessContainerEls = findElements(skeletonEl, '.fc-business-container')

    if (isRtl) {
      this.colContainerEls.reverse()
      this.mirrorContainerEls.reverse()
      this.fgContainerEls.reverse()
      this.bgContainerEls.reverse()
      this.highlightContainerEls.reverse()
      this.businessContainerEls.reverse()
    }

    this.el.appendChild(skeletonEl)
  }
github avpeery / Moon-Phase-Tracker / static / fullcalendar / packages / timegrid / main.esm.js View on Github external
'<div class="fc-highlight-container"></div>' +
                '<div class="fc-bgevent-container"></div>' +
                '<div class="fc-business-container"></div>' +
                '' +
                '');
        }
        if (this.isRtl) {
            parts.reverse();
        }
        skeletonEl = this.contentSkeletonEl = htmlToElement('<div class="fc-content-skeleton">' +
            '' +
            '' + parts.join('') + '' +
            '<table><tbody><tr></tr></tbody></table>' +
            '</div>');
        this.colContainerEls = findElements(skeletonEl, '.fc-content-col');
        this.mirrorContainerEls = findElements(skeletonEl, '.fc-mirror-container');
        this.fgContainerEls = findElements(skeletonEl, '.fc-event-container:not(.fc-mirror-container)');
        this.bgContainerEls = findElements(skeletonEl, '.fc-bgevent-container');
        this.highlightContainerEls = findElements(skeletonEl, '.fc-highlight-container');
        this.businessContainerEls = findElements(skeletonEl, '.fc-business-container');
        if (this.isRtl) {
            this.colContainerEls.reverse();
            this.mirrorContainerEls.reverse();
            this.fgContainerEls.reverse();
            this.bgContainerEls.reverse();
            this.highlightContainerEls.reverse();
            this.businessContainerEls.reverse();
        }
        this.el.appendChild(skeletonEl);
    };
    TimeGrid.prototype.unrenderContentSkeleton = function () {
github fullcalendar / fullcalendar / packages / timegrid / src / TimeGrid.ts View on Github external
_renderColumns(cells: TimeGridCell[], dateProfile: DateProfile) {
    let { calendar, view, isRtl, theme, dateEnv } = this.context

    let bgRow = new DayBgRow(this.context)
    this.rootBgContainerEl.innerHTML =
      '' +
        bgRow.renderHtml({
          cells,
          dateProfile,
          renderIntroHtml: this.renderProps.renderBgIntroHtml
        }) +
      '<table class="' + theme.getClass('tableGrid') + '"></table>'

    this.colEls = findElements(this.el, '.fc-day, .fc-disabled-day')

    for (let col = 0; col &lt; this.colCnt; col++) {
      calendar.publiclyTrigger('dayRender', [
        {
          date: dateEnv.toDate(cells[col].date),
          el: this.colEls[col],
          view
        }
      ])
    }

    if (isRtl) {
      this.colEls.reverse()
    }

    this.colPositions = new PositionCache(
github avpeery / Moon-Phase-Tracker / static / fullcalendar / packages / timegrid / main.esm.js View on Github external
'');
        }
        if (this.isRtl) {
            parts.reverse();
        }
        skeletonEl = this.contentSkeletonEl = htmlToElement('<div class="fc-content-skeleton">' +
            '' +
            '' + parts.join('') + '' +
            '<table><tbody><tr></tr></tbody></table>' +
            '</div>');
        this.colContainerEls = findElements(skeletonEl, '.fc-content-col');
        this.mirrorContainerEls = findElements(skeletonEl, '.fc-mirror-container');
        this.fgContainerEls = findElements(skeletonEl, '.fc-event-container:not(.fc-mirror-container)');
        this.bgContainerEls = findElements(skeletonEl, '.fc-bgevent-container');
        this.highlightContainerEls = findElements(skeletonEl, '.fc-highlight-container');
        this.businessContainerEls = findElements(skeletonEl, '.fc-business-container');
        if (this.isRtl) {
            this.colContainerEls.reverse();
            this.mirrorContainerEls.reverse();
            this.fgContainerEls.reverse();
            this.bgContainerEls.reverse();
            this.highlightContainerEls.reverse();
            this.businessContainerEls.reverse();
        }
        this.el.appendChild(skeletonEl);
    };
    TimeGrid.prototype.unrenderContentSkeleton = function () {
github avpeery / Moon-Phase-Tracker / static / fullcalendar / packages / timegrid / main.esm.js View on Github external
'<div class="fc-bgevent-container"></div>' +
                '<div class="fc-business-container"></div>' +
                '' +
                '');
        }
        if (this.isRtl) {
            parts.reverse();
        }
        skeletonEl = this.contentSkeletonEl = htmlToElement('<div class="fc-content-skeleton">' +
            '' +
            '' + parts.join('') + '' +
            '<table><tbody><tr></tr></tbody></table>' +
            '</div>');
        this.colContainerEls = findElements(skeletonEl, '.fc-content-col');
        this.mirrorContainerEls = findElements(skeletonEl, '.fc-mirror-container');
        this.fgContainerEls = findElements(skeletonEl, '.fc-event-container:not(.fc-mirror-container)');
        this.bgContainerEls = findElements(skeletonEl, '.fc-bgevent-container');
        this.highlightContainerEls = findElements(skeletonEl, '.fc-highlight-container');
        this.businessContainerEls = findElements(skeletonEl, '.fc-business-container');
        if (this.isRtl) {
            this.colContainerEls.reverse();
            this.mirrorContainerEls.reverse();
            this.fgContainerEls.reverse();
            this.bgContainerEls.reverse();
            this.highlightContainerEls.reverse();
            this.businessContainerEls.reverse();
        }
        this.el.appendChild(skeletonEl);
    };
    TimeGrid.prototype.unrenderContentSkeleton = function () {