Skip to content

Commit

Permalink
Fix #3629: Calendar value typescript def (#3630)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Nov 13, 2022
1 parent 924b078 commit b1eac1a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions components/lib/calendar/calendar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ type CalendarIconPosType = 'left' | 'right';

type CalendarEventType = React.SyntheticEvent | undefined | null;

type CalendarValueType = Date | Date[] | string | undefined | null;

interface CalendarChangeTargetOptions {
name: string;
id: string;
value: Date | Date[] | undefined | null;
value: CalendarValueType;
}

interface CalendarChangeParams {
originalEvent: React.SyntheticEvent;
value: Date | Date[] | undefined;
value: CalendarValueType;
stopPropagation(): void;
preventDefault(): void;
target: CalendarChangeTargetOptions;
Expand All @@ -37,7 +39,7 @@ interface CalendarViewChangeParams {

interface CalendarSelectParams {
originalEvent: React.SyntheticEvent;
value: Date | Date[];
value: CalendarValueType;
}

interface CalendarDateTemplateParams {
Expand Down Expand Up @@ -131,7 +133,7 @@ export interface CalendarProps {
tooltipOptions?: TooltipOptions;
touchUI?: boolean;
transitionOptions?: CSSTransitionProps;
value?: Date | Date[];
value?: CalendarValueType;
view?: string;
viewDate?: Date;
visible?: boolean;
Expand Down

0 comments on commit b1eac1a

Please sign in to comment.