@fullcalendar/moment-timezone
Advanced tools
Comparing version 6.0.0-beta.4 to 6.0.0
/*! | ||
FullCalendar Moment Timezone Plugin v6.0.0-beta.4 | ||
Docs & License: https://fullcalendar.io/ | ||
FullCalendar Moment Timezone Plugin v6.0.0 | ||
Docs & License: https://fullcalendar.io/docs/moment-timezone-plugin | ||
(c) 2022 Adam Shaw | ||
@@ -5,0 +5,0 @@ */ |
/*! | ||
FullCalendar Moment Timezone Plugin v6.0.0-beta.4 | ||
Docs & License: https://fullcalendar.io/ | ||
FullCalendar Moment Timezone Plugin v6.0.0 | ||
Docs & License: https://fullcalendar.io/docs/moment-timezone-plugin | ||
(c) 2022 Adam Shaw | ||
*/ | ||
FullCalendar.MomentTimezone=function(e,t,n,a){"use strict";function l(e){return e&&e.__esModule?e:{default:e}}var r=l(a);class u extends t.NamedTimeZoneImpl{offsetForArray(e){return r.default.tz(e,this.timeZoneName).utcOffset()}timestampToArray(e){return r.default.tz(e,this.timeZoneName).toArray()}}var m=n.createPlugin({name:"@fullcalendar/moment-timezone",namedTimeZonedImpl:u});return t.globalPlugins.push(m),e.default=m,Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar.Internal,FullCalendar,moment); |
{ | ||
"name": "@fullcalendar/moment-timezone", | ||
"version": "6.0.0-beta.4", | ||
"version": "6.0.0", | ||
"title": "FullCalendar Moment Timezone Plugin", | ||
"description": "Enhanced named time zone functionality with Moment Timezone", | ||
"keywords": [ | ||
"calendar", | ||
"event", | ||
"full-sized" | ||
"full-sized", | ||
"fullcalendar", | ||
"moment", | ||
"moment-timezone", | ||
"timezone" | ||
], | ||
"homepage": "https://fullcalendar.io/", | ||
"docs": "https://fullcalendar.io/docs/moment-timezone-plugin", | ||
"homepage": "https://fullcalendar.io/docs/moment-timezone-plugin", | ||
"peerDependencies": { | ||
"@fullcalendar/core": "~6.0.0", | ||
"moment-timezone": "^0.5.31" | ||
}, | ||
"type": "module", | ||
"bugs": "https://fullcalendar.io/reporting-bugs", | ||
@@ -15,3 +25,2 @@ "repository": { | ||
"url": "https://github.com/fullcalendar/fullcalendar.git", | ||
"homepage": "https://github.com/fullcalendar/fullcalendar", | ||
"directory": "packages/moment-timezone" | ||
@@ -26,9 +35,2 @@ }, | ||
"copyright": "2022 Adam Shaw", | ||
"type": "module", | ||
"title": "FullCalendar Moment Timezone Plugin", | ||
"description": "A connector to the moment-timezone library", | ||
"peerDependencies": { | ||
"@fullcalendar/core": "6.0.0-beta.4", | ||
"moment-timezone": "^0.5.31" | ||
}, | ||
"main": "./index.cjs", | ||
@@ -35,0 +37,0 @@ "module": "./index.js", |
# FullCalendar Moment Timezone Plugin | ||
A connector to the moment-timezone library | ||
Enhanced [named time zone](https://fullcalendar.io/docs/timeZone#named-time-zones) functionality with [Moment Timezone](https://momentjs.com/timezone/) | ||
[View the docs »](https://fullcalendar.io/docs/moment-timezone-plugin) | ||
## Installation | ||
This package was created from the [FullCalendar monorepo »](https://github.com/fullcalendar/fullcalendar) | ||
First, ensure Moment Timezone is installed: | ||
```sh | ||
npm install moment-timezone | ||
``` | ||
Then, install the FullCalendar core package, the Moment Timezone plugin, and any other plugins (like [daygrid](https://fullcalendar.io/docs/month-view)): | ||
```sh | ||
npm install @fullcalendar/core @fullcalendar/moment-timezone @fullcalendar/daygrid | ||
``` | ||
## Usage | ||
Instantiate a Calendar with the necessary plugin: | ||
```js | ||
import { Calendar } from '@fullcalendar/core' | ||
import momentTimezonePlugin from '@fullcalendar/moment-timezone' | ||
import dayGridPlugin from '@fullcalendar/daygrid' | ||
const calendarEl = document.getElementById('calendar') | ||
const calendar = new Calendar(calendarEl, { | ||
plugins: [ | ||
momentTimezonePlugin, | ||
dayGridPlugin | ||
], | ||
initialView: 'dayGridMonth', | ||
timeZone: 'America/New_York' // enhance named time zones | ||
}) | ||
calendar.render() | ||
``` |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
6721
0
41