File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed
src/components/MessageSimple Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -249,6 +249,7 @@ export const MessageContent = themed(
249249 PropTypes . node ,
250250 PropTypes . elementType ,
251251 ] ) ,
252+ formatDate : PropTypes . func ,
252253 } ;
253254
254255 static defaultProps = {
@@ -534,7 +535,9 @@ export const MessageContent = themed(
534535 { ! MessageFooter && showTime ? (
535536 < MetaContainer >
536537 < MetaText alignment = { pos } >
537- { moment ( message . created_at ) . format ( 'h:mmA' ) }
538+ { this . props . formatDate
539+ ? this . props . formatDate ( message . created_at )
540+ : moment ( message . created_at ) . format ( 'h:mmA' ) }
538541 </ MetaText >
539542 </ MetaContainer >
540543 ) : null }
Original file line number Diff line number Diff line change @@ -169,6 +169,7 @@ export const MessageSimple = themed(
169169 PropTypes . node ,
170170 PropTypes . elementType ,
171171 ] ) ,
172+ formatDate : PropTypes . func ,
172173 } ;
173174
174175 static defaultProps = {
Original file line number Diff line number Diff line change @@ -461,6 +461,7 @@ export interface MessageUIComponentProps
461461 /** https://github.com/beefe/react-native-actionsheet/blob/master/lib/styles.js */
462462 actionSheetStyles ?: object ;
463463 AttachmentFileIcon ?: React . ElementType < FileIconUIComponentProps > ;
464+ formatDate ( date : string ) : string ;
464465}
465466
466467export interface MessageRepliesUIComponentProps {
You can’t perform that action at this time.
0 commit comments