File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
projects/igniteui-angular/src/lib/core Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -585,7 +585,7 @@ export function formatDate(value: Date | string | number | null | undefined, for
585585 return '' ;
586586 }
587587 if ( typeof value === "string" || typeof value === "number" ) {
588- value = new Date ( value ) ;
588+ value = getI18nManager ( ) . createDateFromValue ( value ) ;
589589 }
590590 let dateStyle = undefined , timeStyle = undefined ;
591591 if ( format === 'short' || format === 'medium' || format === 'long' || format === 'full' ) {
@@ -596,7 +596,7 @@ export function formatDate(value: Date | string | number | null | undefined, for
596596 } else if ( format . includes ( 'Time' ) ) {
597597 dateStyle = format . replace ( 'Time' , '' ) ;
598598 } else {
599- return getI18nManager ( ) . formatDateCustomFormat ( value , locale , format ) ;
599+ return getI18nManager ( ) . formatDateCustomFormat ( value , locale , format , timezone ) ;
600600 }
601601 const options : Intl . DateTimeFormatOptions = {
602602 dateStyle,
You can’t perform that action at this time.
0 commit comments