Skip to content

Commit 55bea6c

Browse files
Merge pull request #5168 from Hacker0x01/eslint9
Upgrade to Eslint 9
2 parents 3397522 + 190184e commit 55bea6c

23 files changed

+610
-478
lines changed

.eslintrc.js

Lines changed: 0 additions & 98 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ import "react-datepicker/dist/react-datepicker.css";
3636

3737
const Example = () => {
3838
const [startDate, setStartDate] = useState(new Date());
39-
return (
40-
<DatePicker selected={startDate} onChange={(date) => setStartDate(date)} />
41-
);
39+
return <DatePicker selected={startDate} onChange={(date) => setStartDate(date)} />;
4240
};
4341
```
4442

@@ -69,12 +67,7 @@ See [here](https://github.com/Hacker0x01/react-datepicker/blob/main/docs/datepic
6967
You can also include a time picker by adding the showTimeSelect prop
7068

7169
```js
72-
<DatePicker
73-
selected={date}
74-
onChange={handleDateChange}
75-
showTimeSelect
76-
dateFormat="Pp"
77-
/>
70+
<DatePicker selected={date} onChange={handleDateChange} showTimeSelect dateFormat="Pp" />
7871
```
7972

8073
Times will be displayed at 30-minute intervals by default (default configurable via timeIntervals prop)

docs/calendar_container.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
`calendar_container` (component)
2-
================================
1+
# `calendar_container` (component)
32

4-
5-
| name | type | default value | description |
6-
|---|---|---|---|
7-
|`showTime`||`false`||
8-
|`showTimeSelectOnly`||`false`||
3+
| name | type | default value | description |
4+
| -------------------- | ---- | ------------- | ----------- |
5+
| `showTime` | | `false` | |
6+
| `showTimeSelectOnly` | | `false` | |

docs/calendar_icon.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
`calendar_icon` (component)
2-
===========================
1+
# `calendar_icon` (component)
32

43
`CalendarIcon` is a React component that renders an icon for a calendar.
54
The icon can be a string representing a CSS class, a React node, or a default SVG icon.
65

76
@component
8-
@prop icon - The icon to be displayed. This can be a string representing a CSS class or a React node.
9-
@prop className - An optional string representing additional CSS classes to be applied to the icon.
10-
@prop onClick - An optional function to be called when the icon is clicked.
7+
@prop icon - The icon to be displayed. This can be a string representing a CSS class or a React node.
8+
@prop className - An optional string representing additional CSS classes to be applied to the icon.
9+
@prop onClick - An optional function to be called when the icon is clicked.
1110

1211
@example
1312
// To use a CSS class as the icon
@@ -17,10 +16,10 @@ The icon can be a string representing a CSS class, a React node, or a default SV
1716
// To use a React node as the icon
1817
<CalendarIcon icon={<MyIconComponent />} onClick={myClickHandler} />
1918

20-
@returns The `CalendarIcon` component.
19+
@returns The `CalendarIcon` component.
2120

22-
| name | type | default value | description |
23-
|---|---|---|---|
24-
|`className`||`""`||
25-
|`icon`||||
26-
|`onClick`||||
21+
| name | type | default value | description |
22+
| ----------- | ---- | ------------- | ----------- |
23+
| `className` | | `""` | |
24+
| `icon` | | | |
25+
| `onClick` | | | |

docs/click_outside_wrapper.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
`click_outside_wrapper` (component)
2-
===================================
1+
# `click_outside_wrapper` (component)
32

4-
5-
| name | type | default value | description |
6-
|---|---|---|---|
7-
|`children` (required)||||
8-
|`className`||||
9-
|`containerRef`||||
10-
|`ignoreClass`||||
11-
|`onClickOutside` (required)||||
12-
|`style`||||
3+
| name | type | default value | description |
4+
| --------------------------- | ---- | ------------- | ----------- |
5+
| `children` (required) | | | |
6+
| `className` | | | |
7+
| `containerRef` | | | |
8+
| `ignoreClass` | | | |
9+
| `onClickOutside` (required) | | | |
10+
| `style` | | | |

docs/datepicker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ General datepicker component.
7373
| |
7474
| `popperModifiers` | `object` | | |
7575
| `popperPlacement` | `enumpopperPlacementPositions` | | |
76-
| `preventOpenOnFocus` | `bool` | false | When this is true, the datepicker will not automatically open when the date field is focused |
76+
| `preventOpenOnFocus` | `bool` | false | When this is true, the datepicker will not automatically open when the date field is focused |
7777
| `readOnly` | `bool` | | |
7878
| `required` | `bool` | | |
7979
| `scrollableYearDropdown` | `bool` | | |

docs/index.md

Lines changed: 93 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,94 @@
1-
`index` (component)
2-
===================
1+
# `index` (component)
32

4-
5-
| name | type | default value | description |
6-
|---|---|---|---|
7-
|`allowSameDay`||`false`||
8-
|`ariaDescribedBy`||||
9-
|`ariaInvalid`||||
10-
|`ariaLabelClose`||||
11-
|`ariaLabelledBy`||||
12-
|`ariaRequired`||||
13-
|`autoComplete`||||
14-
|`autoFocus`||||
15-
|`calendarClassName`||||
16-
|`calendarContainer`||||
17-
|`calendarIconClassName`||||
18-
|`calendarIconClassname`||||
19-
|`calendarStartDay`||`undefined`||
20-
|`className`||||
21-
|`clearButtonClassName`||||
22-
|`clearButtonTitle`||||
23-
|`closeOnScroll`||||
24-
|`customInput`||||
25-
|`customInputRef`||||
26-
|`customTimeInput`||`null`||
27-
|`dateFormat`||`"MM/dd/yyyy"`||
28-
|`dateFormatCalendar`||`"LLLL yyyy"`||
29-
|`disabled`||`false`||
30-
|`disabledKeyboardNavigation`||`false`||
31-
|`dropdownMode`||`"scroll"`||
32-
|`enableTabLoop`||`true`||
33-
|`endDate`||||
34-
|`excludeScrollbar`||`true`||
35-
|`focusSelectedMonth`||`false`||
36-
|`form`||||
37-
|`highlightDates`||||
38-
|`holidays`||||
39-
|`id`||||
40-
|`isClearable`||||
41-
|`monthsShown`||`1`||
42-
|`name`||||
43-
|`nextMonthAriaLabel`||`"Next Month"`||
44-
|`nextMonthButtonLabel`||`"Next Month"`||
45-
|`nextYearAriaLabel`||`"Next Year"`||
46-
|`nextYearButtonLabel`||`"Next Year"`||
47-
|`onBlur`||||
48-
|`onCalendarClose`||||
49-
|`onCalendarOpen`||||
50-
|`onChangeRaw`||||
51-
|`onClickOutside`||||
52-
|`onFocus`||||
53-
|`onInputClick`||||
54-
|`onInputError`||||
55-
|`onKeyDown`||||
56-
|`onSelect`||||
57-
|`open`||||
58-
|`placeholderText`||||
59-
|`popperClassName`||||
60-
|`preventOpenOnFocus`||`false`||
61-
|`previousMonthAriaLabel`||`"Previous Month"`||
62-
|`previousMonthButtonLabel`||`"Previous Month"`||
63-
|`previousYearAriaLabel`||`"Previous Year"`||
64-
|`previousYearButtonLabel`||`"Previous Year"`||
65-
|`readOnly`||`false`||
66-
|`required`||||
67-
|`selected`||||
68-
|`selectsDisabledDaysInRange`||`false`||
69-
|`shouldCloseOnSelect`||`true`||
70-
|`showDateSelect`||||
71-
|`showFourColumnMonthYearPicker`||`false`||
72-
|`showFullMonthYearPicker`||`false`||
73-
|`showIcon`||||
74-
|`showMonthYearPicker`||`false`||
75-
|`showPopperArrow`||`true`||
76-
|`showPreviousMonths`||`false`||
77-
|`showQuarterYearPicker`||`false`||
78-
|`showTimeInput`||`false`||
79-
|`showTimeSelect`||`false`||
80-
|`showTwoColumnMonthYearPicker`||`false`||
81-
|`showWeekPicker`||`false`||
82-
|`showYearPicker`||`false`||
83-
|`startDate`||||
84-
|`startOpen`||||
85-
|`strictParsing`||`false`||
86-
|`swapRange`||`false`||
87-
|`tabIndex`||||
88-
|`timeCaption`||`"Time"`||
89-
|`timeInputLabel`||`"Time"`||
90-
|`timeIntervals`||`30`||
91-
|`title`||||
92-
|`toggleCalendarOnIconClick`||`false`||
93-
|`usePointerEvent`||`false`||
94-
|`value`||||
95-
|`withPortal`||`false`||
96-
|`yearItemNumber`||`12`||
3+
| name | type | default value | description |
4+
| ------------------------------- | ---- | ------------------ | ----------- |
5+
| `allowSameDay` | | `false` | |
6+
| `ariaDescribedBy` | | | |
7+
| `ariaInvalid` | | | |
8+
| `ariaLabelClose` | | | |
9+
| `ariaLabelledBy` | | | |
10+
| `ariaRequired` | | | |
11+
| `autoComplete` | | | |
12+
| `autoFocus` | | | |
13+
| `calendarClassName` | | | |
14+
| `calendarContainer` | | | |
15+
| `calendarIconClassName` | | | |
16+
| `calendarIconClassname` | | | |
17+
| `calendarStartDay` | | `undefined` | |
18+
| `className` | | | |
19+
| `clearButtonClassName` | | | |
20+
| `clearButtonTitle` | | | |
21+
| `closeOnScroll` | | | |
22+
| `customInput` | | | |
23+
| `customInputRef` | | | |
24+
| `customTimeInput` | | `null` | |
25+
| `dateFormat` | | `"MM/dd/yyyy"` | |
26+
| `dateFormatCalendar` | | `"LLLL yyyy"` | |
27+
| `disabled` | | `false` | |
28+
| `disabledKeyboardNavigation` | | `false` | |
29+
| `dropdownMode` | | `"scroll"` | |
30+
| `enableTabLoop` | | `true` | |
31+
| `endDate` | | | |
32+
| `excludeScrollbar` | | `true` | |
33+
| `focusSelectedMonth` | | `false` | |
34+
| `form` | | | |
35+
| `highlightDates` | | | |
36+
| `holidays` | | | |
37+
| `id` | | | |
38+
| `isClearable` | | | |
39+
| `monthsShown` | | `1` | |
40+
| `name` | | | |
41+
| `nextMonthAriaLabel` | | `"Next Month"` | |
42+
| `nextMonthButtonLabel` | | `"Next Month"` | |
43+
| `nextYearAriaLabel` | | `"Next Year"` | |
44+
| `nextYearButtonLabel` | | `"Next Year"` | |
45+
| `onBlur` | | | |
46+
| `onCalendarClose` | | | |
47+
| `onCalendarOpen` | | | |
48+
| `onChangeRaw` | | | |
49+
| `onClickOutside` | | | |
50+
| `onFocus` | | | |
51+
| `onInputClick` | | | |
52+
| `onInputError` | | | |
53+
| `onKeyDown` | | | |
54+
| `onSelect` | | | |
55+
| `open` | | | |
56+
| `placeholderText` | | | |
57+
| `popperClassName` | | | |
58+
| `preventOpenOnFocus` | | `false` | |
59+
| `previousMonthAriaLabel` | | `"Previous Month"` | |
60+
| `previousMonthButtonLabel` | | `"Previous Month"` | |
61+
| `previousYearAriaLabel` | | `"Previous Year"` | |
62+
| `previousYearButtonLabel` | | `"Previous Year"` | |
63+
| `readOnly` | | `false` | |
64+
| `required` | | | |
65+
| `selected` | | | |
66+
| `selectsDisabledDaysInRange` | | `false` | |
67+
| `shouldCloseOnSelect` | | `true` | |
68+
| `showDateSelect` | | | |
69+
| `showFourColumnMonthYearPicker` | | `false` | |
70+
| `showFullMonthYearPicker` | | `false` | |
71+
| `showIcon` | | | |
72+
| `showMonthYearPicker` | | `false` | |
73+
| `showPopperArrow` | | `true` | |
74+
| `showPreviousMonths` | | `false` | |
75+
| `showQuarterYearPicker` | | `false` | |
76+
| `showTimeInput` | | `false` | |
77+
| `showTimeSelect` | | `false` | |
78+
| `showTwoColumnMonthYearPicker` | | `false` | |
79+
| `showWeekPicker` | | `false` | |
80+
| `showYearPicker` | | `false` | |
81+
| `startDate` | | | |
82+
| `startOpen` | | | |
83+
| `strictParsing` | | `false` | |
84+
| `swapRange` | | `false` | |
85+
| `tabIndex` | | | |
86+
| `timeCaption` | | `"Time"` | |
87+
| `timeInputLabel` | | `"Time"` | |
88+
| `timeIntervals` | | `30` | |
89+
| `title` | | | |
90+
| `toggleCalendarOnIconClick` | | `false` | |
91+
| `usePointerEvent` | | `false` | |
92+
| `value` | | | |
93+
| `withPortal` | | `false` | |
94+
| `yearItemNumber` | | `12` | |

0 commit comments

Comments
 (0)