react-day-picker 10.0.0-next.2 → 10.0.0-next.4
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/README.md +7 -0
- package/dist/cjs/UI.d.ts +2 -2
- package/dist/cjs/UI.js +2 -2
- package/dist/cjs/types/props.d.ts +2 -2
- package/dist/cjs/useCalendar.d.ts +7 -10
- package/dist/esm/UI.d.ts +2 -2
- package/dist/esm/UI.js +2 -2
- package/dist/esm/types/props.d.ts +2 -2
- package/dist/esm/useCalendar.d.ts +7 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,6 +31,13 @@ DayPicker is written in TypeScript and compiled to CommonJS and ESM. It relies o
|
|
|
31
31
|
npm install react-day-picker
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
+
If you are trying the v10 prereleases with one of the alternative calendar
|
|
35
|
+
integrations, install both packages together. For example:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install react-day-picker@next @daypicker/persian@next
|
|
39
|
+
```
|
|
40
|
+
|
|
34
41
|
<a href="https://www.npmjs.com/package/react-day-picker"><img src="https://img.shields.io/npm/v/react-day-picker" alt="npm version"/></a> <img src="https://img.shields.io/npm/dm/react-day-picker.svg" alt="npm downloads"/> <img src="https://img.shields.io/bundlephobia/minzip/react-day-picker" alt="Min gzipped size"/>
|
|
35
42
|
|
|
36
43
|
## Example
|
package/dist/cjs/UI.d.ts
CHANGED
|
@@ -79,8 +79,8 @@ export declare enum DayFlag {
|
|
|
79
79
|
today = "today"
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
82
|
-
* Enum representing selection states that can be applied to the
|
|
83
|
-
* element in selection mode.
|
|
82
|
+
* Enum representing selection states that can be applied to the
|
|
83
|
+
* {@link UI | UI.Day} element in selection mode.
|
|
84
84
|
*/
|
|
85
85
|
export declare enum SelectionState {
|
|
86
86
|
/** The day is at the end of a selected range. */
|
package/dist/cjs/UI.js
CHANGED
|
@@ -84,8 +84,8 @@ var DayFlag;
|
|
|
84
84
|
DayFlag["today"] = "today";
|
|
85
85
|
})(DayFlag || (exports.DayFlag = DayFlag = {}));
|
|
86
86
|
/**
|
|
87
|
-
* Enum representing selection states that can be applied to the
|
|
88
|
-
* element in selection mode.
|
|
87
|
+
* Enum representing selection states that can be applied to the
|
|
88
|
+
* {@link UI | UI.Day} element in selection mode.
|
|
89
89
|
*/
|
|
90
90
|
var SelectionState;
|
|
91
91
|
(function (SelectionState) {
|
|
@@ -356,8 +356,8 @@ export interface PropsBase {
|
|
|
356
356
|
/**
|
|
357
357
|
* Add the language tag to the container element.
|
|
358
358
|
*
|
|
359
|
-
* When omitted, DayPicker uses the active locale code (`locale.code`).
|
|
360
|
-
*
|
|
359
|
+
* When omitted, DayPicker uses the active locale code (`locale.code`). Set
|
|
360
|
+
* this prop to override the language tag.
|
|
361
361
|
*/
|
|
362
362
|
lang?: HTMLDivElement["lang"];
|
|
363
363
|
/**
|
|
@@ -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
|
}
|
package/dist/esm/UI.d.ts
CHANGED
|
@@ -79,8 +79,8 @@ export declare enum DayFlag {
|
|
|
79
79
|
today = "today"
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
82
|
-
* Enum representing selection states that can be applied to the
|
|
83
|
-
* element in selection mode.
|
|
82
|
+
* Enum representing selection states that can be applied to the
|
|
83
|
+
* {@link UI | UI.Day} element in selection mode.
|
|
84
84
|
*/
|
|
85
85
|
export declare enum SelectionState {
|
|
86
86
|
/** The day is at the end of a selected range. */
|
package/dist/esm/UI.js
CHANGED
|
@@ -81,8 +81,8 @@ export var DayFlag;
|
|
|
81
81
|
DayFlag["today"] = "today";
|
|
82
82
|
})(DayFlag || (DayFlag = {}));
|
|
83
83
|
/**
|
|
84
|
-
* Enum representing selection states that can be applied to the
|
|
85
|
-
* element in selection mode.
|
|
84
|
+
* Enum representing selection states that can be applied to the
|
|
85
|
+
* {@link UI | UI.Day} element in selection mode.
|
|
86
86
|
*/
|
|
87
87
|
export var SelectionState;
|
|
88
88
|
(function (SelectionState) {
|
|
@@ -356,8 +356,8 @@ export interface PropsBase {
|
|
|
356
356
|
/**
|
|
357
357
|
* Add the language tag to the container element.
|
|
358
358
|
*
|
|
359
|
-
* When omitted, DayPicker uses the active locale code (`locale.code`).
|
|
360
|
-
*
|
|
359
|
+
* When omitted, DayPicker uses the active locale code (`locale.code`). Set
|
|
360
|
+
* this prop to override the language tag.
|
|
361
361
|
*/
|
|
362
362
|
lang?: HTMLDivElement["lang"];
|
|
363
363
|
/**
|
|
@@ -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
|
}
|