Skip to content

Commit 26cc987

Browse files
fix: Fix constructor
1 parent 47d9cab commit 26cc987

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/@internationalized/date/src/CalendarDate.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,13 @@ export class CalendarDate {
6464
constructor(calendar: Calendar, year: number, month: number, day: number, constrainDay?: boolean);
6565
constructor(calendar: Calendar, era: string, year: number, month: number, day: number, constrainDay?: boolean);
6666
constructor(...args: any[]) {
67-
let [calendar, era, year, month, day, constrainDay] = shiftArgs(args);
67+
let [calendar, era, year, month, day] = shiftArgs(args);
6868
this.calendar = calendar;
6969
this.era = era;
7070
this.year = year;
7171
this.month = month;
7272
this.day = day;
73+
const constrainDay = args.shift() || 0;
7374

7475
constrain(this, constrainDay);
7576
}

0 commit comments

Comments
 (0)