Skip to content

Commit f25ad43

Browse files
committed
Add time picker.
1 parent 7f44868 commit f25ad43

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

src/components/Datepicker.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -375,15 +375,18 @@ const Datepicker: React.FC<DatepickerType> = ({
375375
showShortcuts ? "md:pl-2" : "md:pl-1"
376376
} pr-2 lg:pr-1`}
377377
>
378-
<Calendar
379-
date={firstDate}
380-
onClickPrevious={previousMonthFirst}
381-
onClickNext={nextMonthFirst}
382-
changeMonth={changeFirstMonth}
383-
changeYear={changeFirstYear}
384-
minDate={minDate}
385-
maxDate={maxDate}
386-
/>
378+
<div>
379+
<Calendar
380+
date={firstDate}
381+
onClickPrevious={previousMonthFirst}
382+
onClickNext={nextMonthFirst}
383+
changeMonth={changeFirstMonth}
384+
changeYear={changeFirstYear}
385+
minDate={minDate}
386+
maxDate={maxDate}
387+
/>
388+
{asSingle && asTimePicker && <Time />}
389+
</div>
387390

388391
{useRange && (
389392
<>
@@ -404,7 +407,6 @@ const Datepicker: React.FC<DatepickerType> = ({
404407
)}
405408
</div>
406409
</div>
407-
{asSingle && asTimePicker && <Time />}
408410
{showFooter && <Footer />}
409411
</div>
410412
</div>

0 commit comments

Comments
 (0)