@@ -5,13 +5,13 @@ import Calendar from "../components/Calendar";
5
5
import Footer from "../components/Footer" ;
6
6
import Input from "../components/Input" ;
7
7
import Shortcuts from "../components/Shortcuts" ;
8
- import Time from "../components/Time" ;
9
8
import { COLORS , DATE_FORMAT , DEFAULT_COLOR , LANGUAGE } from "../constants" ;
10
9
import DatepickerContext from "../contexts/DatepickerContext" ;
11
10
import { formatDate , nextMonth , previousMonth } from "../helpers" ;
12
11
import useOnClickOutside from "../hooks" ;
13
- import { Period , DatepickerType , ColorKeys , PeriodDay } from "../types" ;
12
+ import { ColorKeys , DatepickerType , Period , PeriodDay } from "../types" ;
14
13
14
+ import Time from "./Time" ;
15
15
import { Arrow , VerticalDash } from "./utils" ;
16
16
17
17
const Datepicker : React . FC < DatepickerType > = ( {
@@ -63,9 +63,9 @@ const Datepicker: React.FC<DatepickerType> = ({
63
63
const [ inputText , setInputText ] = useState < string > ( "" ) ;
64
64
const [ inputRef , setInputRef ] = useState ( React . createRef < HTMLInputElement > ( ) ) ;
65
65
66
- const [ hour , setHour ] = useState < string > ( "1 " ) ;
66
+ const [ hour , setHour ] = useState < string > ( "8 " ) ;
67
67
const [ minute , setMinute ] = useState < string > ( "00" ) ;
68
- const [ periodDay , setPeriodDay ] = useState < PeriodDay > ( "PM " ) ;
68
+ const [ periodDay , setPeriodDay ] = useState < PeriodDay > ( "AM " ) ;
69
69
70
70
// Custom Hooks use
71
71
useOnClickOutside ( containerRef , ( ) => {
@@ -361,17 +361,17 @@ const Datepicker: React.FC<DatepickerType> = ({
361
361
< Input setContextRef = { setInputRef } />
362
362
363
363
< div
364
- className = "transition-all ease-out duration-300 absolute z-10 mt-[1px] text-sm lg:text-xs 2xl:text-sm translate-y-4 opacity-0 hidden "
364
+ className = "absolute z-10 mt-[1px] hidden translate-y-4 text-sm opacity-0 transition-all duration-300 ease-out lg:text-xs 2xl:text-sm"
365
365
ref = { calendarContainerRef }
366
366
>
367
367
< Arrow ref = { arrowRef } />
368
368
369
- < div className = "mt-2.5 shadow-sm border border-gray-300 px-1 py-0.5 bg-white dark:bg -slate-800 dark:text-white dark:border-slate-600 rounded-lg " >
370
- < div className = "flex flex-col lg:flex-row py-2 " >
369
+ < div className = "mt-2.5 rounded-lg border border-gray-300 bg-white px-1 py-0.5 shadow-sm dark:border -slate-600 dark:bg-slate-800 dark:text-white " >
370
+ < div className = "flex flex-col py-2 lg:flex-row" >
371
371
{ showShortcuts && < Shortcuts /> }
372
372
373
373
< div
374
- className = { `flex items-stretch flex-col md:flex-row space-y-4 md:space-y-0 md:space-x-1.5 ${
374
+ className = { `flex flex-col items-stretch space-y-4 md:flex-row md:space-x-1.5 md:space-y-0 ${
375
375
showShortcuts ? "md:pl-2" : "md:pl-1"
376
376
} pr-2 lg:pr-1`}
377
377
>
@@ -393,7 +393,6 @@ const Datepicker: React.FC<DatepickerType> = ({
393
393
< div className = "flex items-center" >
394
394
< VerticalDash />
395
395
</ div >
396
-
397
396
< Calendar
398
397
date = { secondDate }
399
398
onClickPrevious = { previousMonthSecond }
0 commit comments