We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48a6ce1 commit a43da41Copy full SHA for a43da41
src/components/Datepicker.tsx
@@ -24,7 +24,7 @@ const Datepicker: React.FC<DatepickerType> = ({
24
asSingle = false,
25
placeholder = null,
26
separator = "~",
27
- startFrom = null,
+ startFrom = new Date(),
28
i18n = LANGUAGE,
29
disabled = false,
30
inputClassName = null,
@@ -52,6 +52,7 @@ const Datepicker: React.FC<DatepickerType> = ({
52
const [firstDate, setFirstDate] = useState<dayjs.Dayjs>(
53
startFrom && dayjs(startFrom).isValid() ? dayjs(startFrom) : dayjs()
54
);
55
+
56
const [secondDate, setSecondDate] = useState<dayjs.Dayjs>(nextMonth(firstDate));
57
const [period, setPeriod] = useState<Period>({
58
start: null,
0 commit comments