react-day-picker 10.0.0-next.3 → 10.0.0-next.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/useCalendar.d.ts +7 -10
- package/dist/esm/useCalendar.d.ts +7 -10
- package/package.json +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { CalendarDay, CalendarMonth, CalendarWeek, DateLib } from "./classes/index.js";
|
|
2
2
|
import type { DayPickerProps } from "./types/props.js";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Returns the calendar object used by DayPicker custom components.
|
|
5
5
|
*
|
|
6
6
|
* @see https://daypicker.dev/guides/custom-components
|
|
7
7
|
*/
|
|
8
8
|
export interface Calendar {
|
|
9
9
|
/**
|
|
10
|
-
* All the days displayed in the calendar.
|
|
11
|
-
* {@link CalendarContext.dates}, it may
|
|
10
|
+
* All the days displayed in the calendar. Unlike
|
|
11
|
+
* {@link CalendarContext.dates}, it may contain duplicated dates when shown
|
|
12
12
|
* outside the month.
|
|
13
13
|
*/
|
|
14
14
|
days: CalendarDay[];
|
|
15
|
-
/** The
|
|
15
|
+
/** The weeks displayed in the calendar. */
|
|
16
16
|
weeks: CalendarWeek[];
|
|
17
17
|
/** The months displayed in the calendar. */
|
|
18
18
|
months: CalendarMonth[];
|
|
@@ -27,19 +27,16 @@ export interface Calendar {
|
|
|
27
27
|
navStart: Date | undefined;
|
|
28
28
|
/**
|
|
29
29
|
* The month where the navigation ends. `undefined` if the calendar can be
|
|
30
|
-
* navigated indefinitely to the
|
|
30
|
+
* navigated indefinitely to the future.
|
|
31
31
|
*/
|
|
32
32
|
navEnd: Date | undefined;
|
|
33
33
|
/** Navigate to the specified month. Will fire the `onMonthChange` callback. */
|
|
34
34
|
goToMonth: (month: Date) => void;
|
|
35
35
|
/**
|
|
36
|
-
* Navigate to the
|
|
37
|
-
*
|
|
38
|
-
* month before the date.
|
|
36
|
+
* Navigate to the month containing the specified day when it falls outside
|
|
37
|
+
* the currently displayed calendar.
|
|
39
38
|
*
|
|
40
39
|
* @param day - The date to navigate to.
|
|
41
|
-
* @param dateToCompare - Optional. If `date` is before `dateToCompare`, the
|
|
42
|
-
* month is set to one month before the date.
|
|
43
40
|
*/
|
|
44
41
|
goToDay: (day: CalendarDay) => void;
|
|
45
42
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { CalendarDay, CalendarMonth, CalendarWeek, DateLib } from "./classes/index.js";
|
|
2
2
|
import type { DayPickerProps } from "./types/props.js";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Returns the calendar object used by DayPicker custom components.
|
|
5
5
|
*
|
|
6
6
|
* @see https://daypicker.dev/guides/custom-components
|
|
7
7
|
*/
|
|
8
8
|
export interface Calendar {
|
|
9
9
|
/**
|
|
10
|
-
* All the days displayed in the calendar.
|
|
11
|
-
* {@link CalendarContext.dates}, it may
|
|
10
|
+
* All the days displayed in the calendar. Unlike
|
|
11
|
+
* {@link CalendarContext.dates}, it may contain duplicated dates when shown
|
|
12
12
|
* outside the month.
|
|
13
13
|
*/
|
|
14
14
|
days: CalendarDay[];
|
|
15
|
-
/** The
|
|
15
|
+
/** The weeks displayed in the calendar. */
|
|
16
16
|
weeks: CalendarWeek[];
|
|
17
17
|
/** The months displayed in the calendar. */
|
|
18
18
|
months: CalendarMonth[];
|
|
@@ -27,19 +27,16 @@ export interface Calendar {
|
|
|
27
27
|
navStart: Date | undefined;
|
|
28
28
|
/**
|
|
29
29
|
* The month where the navigation ends. `undefined` if the calendar can be
|
|
30
|
-
* navigated indefinitely to the
|
|
30
|
+
* navigated indefinitely to the future.
|
|
31
31
|
*/
|
|
32
32
|
navEnd: Date | undefined;
|
|
33
33
|
/** Navigate to the specified month. Will fire the `onMonthChange` callback. */
|
|
34
34
|
goToMonth: (month: Date) => void;
|
|
35
35
|
/**
|
|
36
|
-
* Navigate to the
|
|
37
|
-
*
|
|
38
|
-
* month before the date.
|
|
36
|
+
* Navigate to the month containing the specified day when it falls outside
|
|
37
|
+
* the currently displayed calendar.
|
|
39
38
|
*
|
|
40
39
|
* @param day - The date to navigate to.
|
|
41
|
-
* @param dateToCompare - Optional. If `date` is before `dateToCompare`, the
|
|
42
|
-
* month is set to one month before the date.
|
|
43
40
|
*/
|
|
44
41
|
goToDay: (day: CalendarDay) => void;
|
|
45
42
|
}
|