@acusti/date-picker 0.10.1 → 0.11.0
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 +3 -3
- package/dist/DatePicker.d.ts +1 -1
- package/dist/index.js +868 -4
- package/dist/index.js.map +1 -1
- package/package.json +16 -8
- package/dist/DatePicker.js +0 -108
- package/dist/DatePicker.js.flow +0 -31
- package/dist/DatePicker.js.map +0 -1
- package/dist/MonthCalendar.js +0 -105
- package/dist/MonthCalendar.js.flow +0 -20
- package/dist/MonthCalendar.js.map +0 -1
- package/dist/index.js.flow +0 -10
- package/dist/styles/date-picker.js +0 -62
- package/dist/styles/date-picker.js.map +0 -1
- package/dist/styles/month-calendar.js +0 -154
- package/dist/styles/month-calendar.js.map +0 -1
- package/dist/utils.js +0 -49
- package/dist/utils.js.flow +0 -20
- package/dist/utils.js.map +0 -1
- package/dist/utils.test.d.ts +0 -1
- package/dist/utils.test.js +0 -88
- package/dist/utils.test.js.flow +0 -6
- package/dist/utils.test.js.map +0 -1
- package/src/DatePicker.tsx +0 -203
- package/src/MonthCalendar.tsx +0 -195
- package/src/index.ts +0 -3
- package/src/styles/date-picker.ts +0 -62
- package/src/styles/month-calendar.ts +0 -154
- package/src/utils.test.ts +0 -163
- package/src/utils.ts +0 -53
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ selections via the `onChange` prop and showing months using abbreviations:
|
|
|
28
28
|
|
|
29
29
|
```tsx
|
|
30
30
|
import { DatePicker } from '@acusti/date-picker';
|
|
31
|
-
import {
|
|
31
|
+
import { useState } from 'react';
|
|
32
32
|
|
|
33
33
|
function Popover() {
|
|
34
34
|
const [dateRangeStart, setDateRangeStart] = useState<null | string>(
|
|
@@ -36,12 +36,12 @@ function Popover() {
|
|
|
36
36
|
);
|
|
37
37
|
const [dateRangeEnd, setDateRangeEnd] = useState<null | string>(null);
|
|
38
38
|
|
|
39
|
-
const handleDateRangeChange =
|
|
39
|
+
const handleDateRangeChange = ({ dateEnd, dateStart }) => {
|
|
40
40
|
setDateRangeStart(dateStart);
|
|
41
41
|
if (dateEnd) {
|
|
42
42
|
setDateRangeEnd(dateEnd);
|
|
43
43
|
}
|
|
44
|
-
}
|
|
44
|
+
};
|
|
45
45
|
|
|
46
46
|
return (
|
|
47
47
|
<DatePicker
|
package/dist/DatePicker.d.ts
CHANGED
|
@@ -20,4 +20,4 @@ export type Props = {
|
|
|
20
20
|
showEndInitially?: boolean;
|
|
21
21
|
useMonthAbbreviations?: boolean;
|
|
22
22
|
};
|
|
23
|
-
export default function DatePicker({ className, dateEnd: _dateEnd, dateStart: _dateStart, initialMonth, isRange, isTwoUp, monthLimitFirst, monthLimitLast, onChange, showEndInitially, useMonthAbbreviations, }: Props): React.JSX.Element;
|
|
23
|
+
export default function DatePicker({ className, dateEnd: _dateEnd, dateStart: _dateStart, initialMonth, isRange: _isRange, isTwoUp, monthLimitFirst, monthLimitLast: _monthLimitLast, onChange, showEndInitially, useMonthAbbreviations, }: Props): React.JSX.Element;
|