DevExtreme React Scheduler报错value.isUTC is not a function求助
问题
使用DevExtreme React Scheduler结合MUI及Moment适配器开发,尝试过Dayjs、DateFNS适配器均无效。打开AppointmentForm时抛出value.isUTC is not a function错误,卸载@mui/x-date-pickers(版本^6.15.0)后问题依旧。
Scheduler组件代码
<Paper> <Scheduler data={schedulerData}> <ViewState currentDate={currentDate} onCurrentDateChange={setCurrentDate} /> <DayView startDayHour={0} endDayHour={23} /> <WeekView /> <MonthView /> <EditingState onCommitChanges={handleCommitChanges} /> <Toolbar /> <ViewSwitcher /> <DateNavigator /> <TodayButton /> <EditRecurrenceMenu /> <Appointments /> <AppointmentTooltip showCloseButton showOpenButton /> <AppointmentForm readOnly /> <DragDropProvider /> </Scheduler> </Paper>
数据源代码
export const schedulerData = [ { id: 1, startDate: new Date(2023, 8, 19, 9, 45), endDate: new Date(2023, 8, 19, 11, 0), title: 'Meeting', }, { id: 2, startDate: new Date(2023, 8, 19, 12, 0), endDate: new Date(2023, 10, 19, 13, 30), title: 'Go to a gym', }, ]
错误堆栈信息
value.isUTC is not a function TypeError: value.isUTC is not a function at AdapterMoment.getTimezone (http://localhost:5173/node_modules/.vite/deps/chunk-4PQPXJTT.js?v=d816e2e5:219:17) at Object.getTimezone (http://localhost:5173/node_modules/.vite/deps/chunk-CJR5LQN3.js?v=d816e2e5:2380:88) at http://localhost:5173/node_modules/.vite/deps/chunk-CJR5LQN3.js?v=d816e2e5:1610:60 at mountMemo (http://localhost:5173/node_modules/.vite/deps/chunk-GYWC62UC.js?v=d816e2e5:12817:27) at Object.useMemo (http://localhost:5173/node_modules/.vite/deps/chunk-GYWC62UC.js?v=d816e2e5:13141:24) at Object.useMemo (http://localhost:5173/node_modules/.vite/deps/chunk-HS5T2ZWL.js?v=d816e2e5:1094:29) at useValueWithTimezone (http://localhost:5173/node_modules/.vite/deps/chunk-CJR5LQN3.js?v=d816e2e5:1610:33) at usePickerValue (http://localhost:5173/node_modules/.vite/deps/chunk-CJR5LQN3.js?v=d816e2e5:10460:7) at usePicker (http://localhost:5173/node_modules/.vite/deps/chunk-CJR5LQN3.js?v=d816e2e5:10854:31) at useDesktopPicker (http://localhost:5173/node_modules/.vite/deps/chunk-CJR5LQN3.js?v=d816e2e5:10929:7)
内容的提问来源于stack exchange,提问作者honzanemecek
相关产品推荐
相关产品推荐

