@@ -3,7 +3,12 @@ import React, { FC, memo, useCallback } from 'react';
33import { QueryColumn } from '../../../public/QueryColumn' ;
44
55import { DatePickerInput } from '../forms/input/DatePickerInput' ;
6- import { formatDate , formatDateTime , formatTime , isDateTimeCol } from '../../util/Date' ;
6+ import {
7+ formatDate ,
8+ formatDateTime ,
9+ getTimeValueFromDatePickerInput ,
10+ isDateTimeCol
11+ } from '../../util/Date' ;
712
813import { MODIFICATION_TYPES , SELECTION_TYPES } from './constants' ;
914import { ValueDescriptor } from './models' ;
@@ -40,14 +45,14 @@ export const DateInputCell: FC<DateInputCellProps> = memo(props => {
4045 if ( newDate && typeof newDate === 'string' ) display = newDate ;
4146 else if ( newDate && newDate instanceof Date ) {
4247 display = col . isTimeColumn
43- ? formatTime ( newDate )
48+ ? getTimeValueFromDatePickerInput ( newDate , col )
4449 : isDateTimeCol ( col )
4550 ? formatDateTime ( newDate )
4651 : formatDate ( newDate ) ;
4752 }
4853 }
4954
50- modifyCell ( colIdx , rowIdx , [ { raw : newDate , display } ] , MODIFICATION_TYPES . REPLACE , col ) ;
55+ modifyCell ( colIdx , rowIdx , [ { raw : col . isTimeColumn ? display : newDate , display } ] , MODIFICATION_TYPES . REPLACE , col ) ;
5156 } ,
5257 [ col , colIdx , modifyCell , rowIdx ]
5358 ) ;
0 commit comments