@fullcalendar/moment
TypeScript icon, indicating that this package has built-in type declarations

6.1.15 • Public • Published

FullCalendar Moment Plugin

Enhanced date formatting and conversion with Moment

Installation

First, ensure Moment is installed:

npm install moment

Then, install the FullCalendar core package, the Moment plugin, and any other plugins (like daygrid):

npm install @fullcalendar/core @fullcalendar/moment @fullcalendar/daygrid

Usage

Instantiate a Calendar with the necessary plugin:

import { Calendar } from '@fullcalendar/core'
import momentPlugin from '@fullcalendar/moment'
import dayGridPlugin from '@fullcalendar/daygrid'

const calendarEl = document.getElementById('calendar')
const calendar = new Calendar(calendarEl, {
  plugins: [
    momentPlugin,
    dayGridPlugin
  ],
  initialView: 'dayGridMonth',
  titleFormat: 'MMMM D, YYYY' // use Moment format strings
})

calendar.render()

Package Sidebar

Install

npm i @fullcalendar/moment

Weekly Downloads

44,239

Version

6.1.15

License

MIT

Unpacked Size

16.6 kB

Total Files

8

Last publish

Collaborators

  • arshaw