How to use the @fullcalendar/core.htmlEscape 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
DayTile.prototype._renderFrame = function (date) {
        var _a = this, theme = _a.theme, dateEnv = _a.dateEnv;
        var title = dateEnv.format(date, createFormatter(this.opt('dayPopoverFormat')) // TODO: cache
        );
        this.el.innerHTML =
            '<div class="fc-header ' + theme.getClass('popoverHeader') + '">' +
                '<span class="fc-title">' +
                htmlEscape(title) +
                '</span>' +
                '<span class="fc-close ' + theme.getIconClass('close') + '"></span>' +
                '</div>' +
                '<div class="fc-body ' + theme.getClass('popoverContent') + '">' +
                '<div class="fc-event-container"></div>' +
                '</div>';
        this.segContainerEl = this.el.querySelector('.fc-event-container');
    };
    DayTile.prototype.queryHit = function (positionLeft, positionTop, elWidth, elHeight) {
github fullcalendar / fullcalendar / packages / timegrid / src / TimeGridEventRenderer.ts View on Github external
''
        ) +
      '&gt;' +
        '<div class="fc-content">' +
          (timeText ?
            '<div data-full="' + htmlEscape(fullTimeText) + '" data-start="' + htmlEscape(startTimeText) + '" class="fc-time">' +
              '<span>' + htmlEscape(timeText) + '</span>' +
            '</div>' :
            ''
            ) +
          (eventDef.title ?
            '<div class="fc-title">' +
              htmlEscape(eventDef.title) +
            '</div>' :
            ''
            ) +
        '</div>' +
        /* TODO: write CSS for this
        (isResizableFromStart ?
          '<div class="fc-resizer fc-start-resizer"></div>' :
          ''
          ) +
        */
        (isResizableFromEnd ?
          '<div class="fc-resizer fc-end-resizer"></div>' :
          ''
          ) +
      ''
  }
github avpeery / Moon-Phase-Tracker / static / fullcalendar / packages / list / main.esm.js View on Github external
}
        return '' +
            (this.displayEventTime ?
                '' +
                    (timeHtml || '') +
                    '' :
                '') +
            '' +
            '<span style="background-color:' + bgColor + '" class="fc-event-dot"></span>' +
            '' +
            '' +
            '' +
            htmlEscape(eventDef.title || '') +
            '' +
            '' +
            '';
    };
    // like "4:00am"
github fullcalendar / fullcalendar / packages / daygrid / src / DayTile.ts View on Github external
_renderFrame(date: DateMarker) {
    let { theme, dateEnv, options } = this.context

    let title = dateEnv.format(
      date,
      createFormatter(options.dayPopoverFormat) // TODO: cache
    )

    this.el.innerHTML =
      '<div class="fc-header ' + theme.getClass('popoverHeader') + '">' +
        '<span class="fc-title">' +
          htmlEscape(title) +
        '</span>' +
        '<span class="fc-close ' + theme.getIconClass('close') + '"></span>' +
      '</div>' +
      '<div class="fc-body ' + theme.getClass('popoverContent') + '">' +
        '<div class="fc-event-container"></div>' +
      '</div>'

    this.segContainerEl = this.el.querySelector('.fc-event-container')
  }
github fullcalendar / fullcalendar / packages / timegrid / src / AbstractTimeGridView.ts View on Github external
renderHeadIntroHtml = () =&gt; {
    let { theme, dateEnv, options } = this.context
    let range = this.props.dateProfile.renderRange
    let dayCnt = diffDays(range.start, range.end)
    let weekText

    if (options.weekNumbers) {
      weekText = dateEnv.format(range.start, WEEK_HEADER_FORMAT)

      return '' +
        '' +
          buildGotoAnchorHtml( // aside from link, important for matchCellWidths
            options,
            dateEnv,
            { date: range.start, type: 'week', forceOff: dayCnt &gt; 1 },
            htmlEscape(weekText) // inner HTML
          ) +
        ''
    } else {
      return ''
    }
  }
github fullcalendar / fullcalendar / packages / daygrid / src / AbstractDayGridView.ts View on Github external
renderHeadIntroHtml = () =&gt; {
    let { theme, options } = this.context

    if (this.colWeekNumbersVisible) {
      return '' +
        '' +
          '<span>' + // needed for matchCellWidths
            htmlEscape(options.weekLabel) +
          '</span>' +
        ''
    }

    return ''
  }
github fullcalendar / fullcalendar / packages / timegrid / src / TimeGridEventRenderer.ts View on Github external
return '<a style="' + skinCss + '" href="' + htmlEscape(eventDef.url) + '" class="' + classes.join(' ') + '">' +
        '<div class="fc-content">' +
          (timeText ?
            '<div data-full="' + htmlEscape(fullTimeText) + '" data-start="' + htmlEscape(startTimeText) + '" class="fc-time">' +
              '<span>' + htmlEscape(timeText) + '</span>' +
            '</div>' :
            ''
            ) +
          (eventDef.title ?
            '<div class="fc-title">' +
              htmlEscape(eventDef.title) +
            '</div>' :
            ''
            ) +
        '</div>' +
        /* TODO: write CSS for this
        (isResizableFromStart ?
          '<div class="fc-resizer fc-start-resizer"></div>' :
          ''</a>
github fullcalendar / fullcalendar / packages / list / src / ListEventRenderer.ts View on Github external
eventInstance.range.start,
          seg.end,
          false // allDay
        ))
      } else if (seg.isEnd) {
        timeHtml = htmlEscape(this._getTimeText(
          seg.start,
          eventInstance.range.end,
          false // allDay
        ))
      } else { // inner segment that lasts the whole day
        timeHtml = getAllDayHtml(options)
      }
    } else {
      // Display the normal time text for the *event's* times
      timeHtml = htmlEscape(this.getTimeText(eventRange))
    }

    if (url) {
      classes.push('fc-has-url')
    }

    return '' +
      (this.displayEventTime ?
        '' +
          (timeHtml || '') +
        '' :
        '') +
      '' +
        '
github avpeery / Moon-Phase-Tracker / static / fullcalendar / packages / list / main.esm.js View on Github external
return '' +
            (this.displayEventTime ?
                '' +
                    (timeHtml || '') +
                    '' :
                '') +
            '' +
            '<span style="background-color:' + bgColor + '" class="fc-event-dot"></span>' +
            '' +
            '' +
            '' +
            htmlEscape(eventDef.title || '') +
            '' +
            '' +
            '';
    };
    // like "4:00am"
github fullcalendar / fullcalendar / packages / list / src / ListEventRenderer.ts View on Github external
return '' +
      (this.displayEventTime ?
        '' +
          (timeHtml || '') +
        '' :
        '') +
      '' +
        '<span style="background-color:' + bgColor + '" class="fc-event-dot"></span>' +
      '' +
      '' +
        '' +
          htmlEscape(eventDef.title || '') +
        '' +
      '' +
    ''
  }