File tree 2 files changed +4
-4
lines changed 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) => {
53
53
54
54
const border = BORDER_COLOR . focus [ primaryColor as keyof typeof BORDER_COLOR . focus ] ;
55
55
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" ] ] ;
57
57
58
58
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 } ` ;
59
59
@@ -69,12 +69,12 @@ const Input: React.FC<Props> = (e: Props) => {
69
69
const inputValue = e . target . value ;
70
70
71
71
const start = parseFormattedDate ( inputValue . slice ( 0 , 10 ) , displayFormat ) . format (
72
- "YYYY-MM-DD"
72
+ DATE_FORMAT
73
73
) ;
74
74
const end = asSingle
75
75
? start
76
76
: parseFormattedDate ( inputValue . slice ( 11 , inputValue . length ) , displayFormat ) . format (
77
- "YYYY-MM-DD"
77
+ DATE_FORMAT
78
78
) ;
79
79
80
80
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) {
73
73
return date . format ( format ) ;
74
74
}
75
75
76
- export function parseFormattedDate ( date : string , format = "YYYY-MM-DD" ) {
76
+ export function parseFormattedDate ( date : string , format = DATE_FORMAT ) {
77
77
return dayjs ( date , format ) ;
78
78
}
79
79
You can’t perform that action at this time.
0 commit comments