How to use @fullcalendar/daygrid - 8 common examples

To help you get started, we’ve selected a few @fullcalendar/daygrid 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 fullcalendar / fullcalendar / packages / timegrid / src / AbstractTimeGridView.ts View on Github external
this.el.querySelector('.fc-body > tr > td').appendChild(timeGridWrapEl)
    timeGridWrapEl.classList.add('fc-time-grid-container')
    let timeGridEl = createElement('div', { className: 'fc-time-grid' })
    timeGridWrapEl.appendChild(timeGridEl)

    this.timeGrid = new TimeGrid(
      timeGridEl,
      {
        renderBgIntroHtml: this.renderTimeGridBgIntroHtml,
        renderIntroHtml: this.renderTimeGridIntroHtml
      }
    )

    if (context.options.allDaySlot) { // should we display the "all-day" area?

      this.dayGrid = new DayGrid( // the all-day subcomponent of this view
        this.el.querySelector('.fc-day-grid'),
        {
          renderNumberIntroHtml: this.renderDayGridIntroHtml, // don't want numbers
          renderBgIntroHtml: this.renderDayGridBgIntroHtml,
          renderIntroHtml: this.renderDayGridIntroHtml,
          colWeekNumbersVisible: false,
          cellWeekNumbersVisible: false
        }
      )

      // have the day-grid extend it's coordinate area over the <hr> dividing the two grids
      let dividerEl = this.el.querySelector('.fc-divider') as HTMLElement
      this.dayGrid.bottomCoordPadding = dividerEl.getBoundingClientRect().height
    }
  }
github avpeery / Moon-Phase-Tracker / static / fullcalendar / packages / timegrid / main.esm.js View on Github external
_this.el.classList.add('fc-timeGrid-view');
        _this.el.innerHTML = _this.renderSkeletonHtml();
        _this.scroller = new ScrollComponent('hidden', // overflow x
        'auto' // overflow y
        );
        var timeGridWrapEl = _this.scroller.el;
        _this.el.querySelector('.fc-body &gt; tr &gt; td').appendChild(timeGridWrapEl);
        timeGridWrapEl.classList.add('fc-time-grid-container');
        var timeGridEl = createElement('div', { className: 'fc-time-grid' });
        timeGridWrapEl.appendChild(timeGridEl);
        _this.timeGrid = new TimeGrid(_this.context, timeGridEl, {
            renderBgIntroHtml: _this.renderTimeGridBgIntroHtml,
            renderIntroHtml: _this.renderTimeGridIntroHtml
        });
        if (_this.opt('allDaySlot')) { // should we display the "all-day" area?
            _this.dayGrid = new DayGrid(// the all-day subcomponent of this view
            _this.context, _this.el.querySelector('.fc-day-grid'), {
                renderNumberIntroHtml: _this.renderDayGridIntroHtml,
                renderBgIntroHtml: _this.renderDayGridBgIntroHtml,
                renderIntroHtml: _this.renderDayGridIntroHtml,
                colWeekNumbersVisible: false,
                cellWeekNumbersVisible: false
            });
            // have the day-grid extend it's coordinate area over the <hr> dividing the two grids
            var dividerEl = _this.el.querySelector('.fc-divider');
            _this.dayGrid.bottomCoordPadding = dividerEl.getBoundingClientRect().height;
        }
        return _this;
    }
    TimeGridView.prototype.destroy = function () {
github fullcalendar / fullcalendar / packages / __tests__ / src / legacy / views-specific-options.js View on Github external
it('can implicitly target an old-school View subclass', function() {

    function SuperDayGridView() { DayGridView.apply(this, arguments) }
    SuperDayGridView.prototype = Object.create(DayGridView.prototype)

    initCalendar({
      plugins: [
        DayGridPlugin,
        createPlugin({
          views: {
            superBasic: SuperDayGridView
          }
        })
      ],
      views: {
        dayGrid: {
          titleFormat: function() { return 'special!!!' }
        }
      }
    })
github fullcalendar / fullcalendar / packages / __tests__ / src / legacy / views-specific-options.js View on Github external
    function SuperDayGridView() { DayGridView.apply(this, arguments) }
    SuperDayGridView.prototype = Object.create(DayGridView.prototype)
github avpeery / Moon-Phase-Tracker / static / fullcalendar / packages / timegrid / main.esm.js View on Github external
TimeGrid.prototype._renderColumns = function (cells, dateProfile) {
        var _a = this, theme = _a.theme, dateEnv = _a.dateEnv, view = _a.view;
        var bgRow = new DayBgRow(this.context);
        this.rootBgContainerEl.innerHTML =
            '' +
                bgRow.renderHtml({
                    cells: cells,
                    dateProfile: dateProfile,
                    renderIntroHtml: this.renderProps.renderBgIntroHtml
                }) +
                '<table class="' + theme.getClass('tableGrid') + '"></table>';
        this.colEls = findElements(this.el, '.fc-day, .fc-disabled-day');
        for (var col = 0; col &lt; this.colCnt; col++) {
            this.publiclyTrigger('dayRender', [
                {
                    date: dateEnv.toDate(cells[col].date),
                    el: this.colEls[col],
                    view: view
                }
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],
github fullcalendar / fullcalendar / packages / timegrid / src / TimeGridView.ts View on Github external
_renderSkeleton(context: ComponentContext) {
    super._renderSkeleton(context)

    if (context.options.columnHeader) {
      this.header = new DayHeader(
        this.el.querySelector('.fc-head-container')
      )
    }

    this.simpleTimeGrid = new SimpleTimeGrid(this.timeGrid)

    if (this.dayGrid) {
      this.simpleDayGrid = new SimpleDayGrid(this.dayGrid)
    }
  }
github avpeery / Moon-Phase-Tracker / static / fullcalendar / packages / timegrid / main.esm.js View on Github external
function TimeGridView(_context, viewSpec, dateProfileGenerator, parentEl) {
        var _this = _super.call(this, _context, viewSpec, dateProfileGenerator, parentEl) || this;
        _this.buildDayTable = memoize(buildDayTable);
        if (_this.opt('columnHeader')) {
            _this.header = new DayHeader(_this.context, _this.el.querySelector('.fc-head-container'));
        }
        _this.simpleTimeGrid = new SimpleTimeGrid(_this.context, _this.timeGrid);
        if (_this.dayGrid) {
            _this.simpleDayGrid = new SimpleDayGrid(_this.context, _this.dayGrid);
        }
        return _this;
    }
    TimeGridView.prototype.destroy = function () {

@fullcalendar/daygrid

Display events on a month view or "day grid" view

MIT
Latest version published 5 months ago

Package Health Score

79 / 100
Full package analysis