这可能是一个令人尴尬的简单问题,但我对Moment.js和fullcalendar不熟悉。 目标:获取fullcalendar来了一下/日期是几分钟从本地计算机的时间偏移操作。 的理由: 我们希望,而不是桌面的时间显示时间和nowIndicator与老钟在建筑物同步。 到目前为止已经试过: // Get current offset:
var localOffset = moment().utc
我已经安装了片刻JS npm install moment --save
然后在我的根app.js import moment from "moment";
在我的组件 现在正试图 to: moment().day(2).format('YYYY-MM-DD')
但以上返回错误 ReferenceError: moment is not defined"
WWhat可能是错的?
我尝试茉莉花与moment.js一起选择,但我得到这个错误... debug.js:21 Uncaught TypeError: (0 , _moment.moment) is not a function
不知道如果它与moment.js相关,或者如果我设置不正确。感谢任何帮助。 //script.js
import { moment } from 'moment';