File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
frontend/src/components/ChatSettings Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ import { InputStateHandler } from './InputStateHandler';
2424const parseDate = ( dateStr : string | undefined | null ) : Date | undefined => {
2525 if ( ! dateStr ) return undefined ;
2626 try {
27- const date = new Date ( dateStr ) ;
27+ // Append T00:00:00 to force local timezone parsing instead of UTC
28+ const date = new Date ( dateStr + 'T00:00:00' ) ;
2829 // Check if date is valid (Invalid Date has NaN time)
2930 if ( isNaN ( date . getTime ( ) ) ) {
3031 console . warn ( `Invalid date string provided: "${ dateStr } "` ) ;
@@ -38,7 +39,10 @@ const parseDate = (dateStr: string | undefined | null): Date | undefined => {
3839
3940const formatDateValue = ( date : Date | undefined ) : string | undefined => {
4041 if ( ! date ) return undefined ;
41- return date . toISOString ( ) ;
42+ const year = date . getFullYear ( ) ;
43+ const month = String ( date . getMonth ( ) + 1 ) . padStart ( 2 , '0' ) ;
44+ const day = String ( date . getDate ( ) ) . padStart ( 2 , '0' ) ;
45+ return `${ year } -${ month } -${ day } ` ;
4246} ;
4347
4448const formatRangeValue = (
You can’t perform that action at this time.
0 commit comments