File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ const Input: React.FC<Props> = (e: Props) => {
5353
5454 const border = BORDER_COLOR . focus [ primaryColor as keyof typeof BORDER_COLOR . focus ] ;
5555 const ring =
56- RING_COLOR [ "second-focus" ] [ primaryColor as keyof typeof RING_COLOR [ "second-focus" ] ] ;
56+ RING_COLOR [ "second-focus" ] [ primaryColor as keyof ( typeof RING_COLOR ) [ "second-focus" ] ] ;
5757
5858 const defaultInputClassName = `relative transition-all duration-300 py-2.5 pl-4 pr-14 w-full border-gray-300 dark:bg-slate-800 dark:text-white/80 dark:border-slate-600 rounded-lg tracking-wide font-light text-sm placeholder-gray-400 bg-white focus:ring disabled:opacity-40 disabled:cursor-not-allowed ${ border } ${ ring } ` ;
5959
@@ -69,12 +69,12 @@ const Input: React.FC<Props> = (e: Props) => {
6969 const inputValue = e . target . value ;
7070
7171 const start = parseFormattedDate ( inputValue . slice ( 0 , 10 ) , displayFormat ) . format (
72- "YYYY-MM-DD"
72+ DATE_FORMAT
7373 ) ;
7474 const end = asSingle
7575 ? start
7676 : parseFormattedDate ( inputValue . slice ( 11 , inputValue . length ) , displayFormat ) . format (
77- "YYYY-MM-DD"
77+ DATE_FORMAT
7878 ) ;
7979
8080 const input = inputRef ?. current ;
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ export function formatDate(date: dayjs.Dayjs, format = DATE_FORMAT) {
7373 return date . format ( format ) ;
7474}
7575
76- export function parseFormattedDate ( date : string , format = "YYYY-MM-DD" ) {
76+ export function parseFormattedDate ( date : string , format = DATE_FORMAT ) {
7777 return dayjs ( date , format ) ;
7878}
7979
You can’t perform that action at this time.
0 commit comments