diff --git a/components/calendar/demo/notice-calendar.md b/components/calendar/demo/notice-calendar.md index cad8484577..d9836124e7 100644 --- a/components/calendar/demo/notice-calendar.md +++ b/components/calendar/demo/notice-calendar.md @@ -16,10 +16,10 @@ This component can be rendered by using `dateCellRender` and `monthCellRender` w ```tsx import type { BadgeProps } from 'antd'; import { Badge, Calendar } from 'antd'; -import type { Moment } from 'moment'; +import type { Dayjs } from 'dayjs'; import React from 'react'; -const getListData = (value: Moment) => { +const getListData = (value: Dayjs) => { let listData; switch (value.date()) { case 8: @@ -50,14 +50,14 @@ const getListData = (value: Moment) => { return listData || []; }; -const getMonthData = (value: Moment) => { +const getMonthData = (value: Dayjs) => { if (value.month() === 8) { return 1394; } }; const App: React.FC = () => { - const monthCellRender = (value: Moment) => { + const monthCellRender = (value: Dayjs) => { const num = getMonthData(value); return num ? (
@@ -67,7 +67,7 @@ const App: React.FC = () => { ) : null; }; - const dateCellRender = (value: Moment) => { + const dateCellRender = (value: Dayjs) => { const listData = getListData(value); return (