@@ -5,13 +5,13 @@ import Calendar from "../components/Calendar";
55import Footer from "../components/Footer" ;
66import Input from "../components/Input" ;
77import Shortcuts from "../components/Shortcuts" ;
8- import Time from "../components/Time" ;
98import { COLORS , DATE_FORMAT , DEFAULT_COLOR , LANGUAGE } from "../constants" ;
109import DatepickerContext from "../contexts/DatepickerContext" ;
1110import { formatDate , nextMonth , previousMonth } from "../helpers" ;
1211import useOnClickOutside from "../hooks" ;
13- import { Period , DatepickerType , ColorKeys , PeriodDay } from "../types" ;
12+ import { ColorKeys , DatepickerType , Period , PeriodDay } from "../types" ;
1413
14+ import Time from "./Time" ;
1515import { Arrow , VerticalDash } from "./utils" ;
1616
1717const Datepicker : React . FC < DatepickerType > = ( {
@@ -63,9 +63,9 @@ const Datepicker: React.FC<DatepickerType> = ({
6363 const [ inputText , setInputText ] = useState < string > ( "" ) ;
6464 const [ inputRef , setInputRef ] = useState ( React . createRef < HTMLInputElement > ( ) ) ;
6565
66- const [ hour , setHour ] = useState < string > ( "1 " ) ;
66+ const [ hour , setHour ] = useState < string > ( "8 " ) ;
6767 const [ minute , setMinute ] = useState < string > ( "00" ) ;
68- const [ periodDay , setPeriodDay ] = useState < PeriodDay > ( "PM " ) ;
68+ const [ periodDay , setPeriodDay ] = useState < PeriodDay > ( "AM " ) ;
6969
7070 // Custom Hooks use
7171 useOnClickOutside ( containerRef , ( ) => {
@@ -361,17 +361,17 @@ const Datepicker: React.FC<DatepickerType> = ({
361361 < Input setContextRef = { setInputRef } />
362362
363363 < 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"
365365 ref = { calendarContainerRef }
366366 >
367367 < Arrow ref = { arrowRef } />
368368
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" >
371371 { showShortcuts && < Shortcuts /> }
372372
373373 < 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 ${
375375 showShortcuts ? "md:pl-2" : "md:pl-1"
376376 } pr-2 lg:pr-1`}
377377 >
@@ -393,7 +393,6 @@ const Datepicker: React.FC<DatepickerType> = ({
393393 < div className = "flex items-center" >
394394 < VerticalDash />
395395 </ div >
396-
397396 < Calendar
398397 date = { secondDate }
399398 onClickPrevious = { previousMonthSecond }
0 commit comments