File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 77} from 'stores/Transaction/transactionStoreUtils' ;
88import { observer } from 'mobx-react-lite' ;
99import * as types from 'types' ;
10+ import dateUtil from 'utils/date' ;
1011
1112const TransactionDateList = ( {
1213 list,
@@ -29,12 +30,14 @@ const TransactionDateList = ({
2930 transactionList ,
3031 ) ;
3132 return (
32- < TransactionList
33- key = { date }
34- date = { new Date ( date ) }
35- onClick = { onClick }
36- transactionList = { formattedTransactionList }
37- />
33+ < >
34+ < TransactionList
35+ key = { date }
36+ date = { new Date ( dateUtil . addZero ( date ) ) }
37+ onClick = { onClick }
38+ transactionList = { formattedTransactionList }
39+ />
40+ </ >
3841 ) ;
3942 } ;
4043
Original file line number Diff line number Diff line change @@ -73,4 +73,10 @@ export default {
7373 absoluteTargetDate <= absoluteEndDate
7474 ) ;
7575 } ,
76+ addZero ( str : string ) {
77+ const [ year , month , date ] = str . split ( '-' ) ;
78+ return `${ year } -${ month . length === 1 ? `0${ month } ` : month } -${
79+ date . length === 1 ? `0${ date } ` : date
80+ } `;
81+ } ,
7682} ;
You can’t perform that action at this time.
0 commit comments