Skip to content

Commit 6a16e19

Browse files
committed
fix: moment ts error
1 parent 1165b42 commit 6a16e19

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

components/calendar/Header.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Group, Button } from '../radio';
44
import PropTypes from '../_util/vue-types';
55
import { defaultConfigProvider } from '../config-provider';
66
import { VueNode } from '../_util/type';
7+
import moment from 'moment';
78

89
function getMonthsLocale(value: moment.Moment): string[] {
910
const current = value.clone();

components/date-picker/props.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { PropType } from 'vue';
2+
import moment from 'moment';
23
import PropTypes, { withUndefined } from '../_util/vue-types';
34
import { tuple } from '../_util/type';
45

components/date-picker/utils.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import moment from 'moment';
2+
13
type Value = moment.Moment | undefined | null;
24
type Format = string | string[] | undefined | ((val?: Value) => string | string[] | undefined);
35
export function formatDate(value: Value, format: Format) {

0 commit comments

Comments
 (0)