Tasks: change due text to date instead of time to

master
Andrew P Maney 5 years ago committed by Tom Hacohen
parent 0b5274887f
commit 36d6308c88

@ -11,9 +11,7 @@ import CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank';
import * as colors from '@material-ui/core/colors';
import Chip from '@material-ui/core/Chip';
import moment from 'moment';
import { mapPriority } from '../../helpers';
import { mapPriority, formatDate } from '../../helpers';
const checkboxColor = {
[TaskPriorityType.Undefined]: colors.grey[600],
@ -57,7 +55,7 @@ export default React.memo(function TaskListItem(props: PropsType) {
return (
<ListItem
primaryText={title}
secondaryText={task.dueDate && `Due ${moment().to(task.dueDate.toJSDate())}`}
secondaryText={task.dueDate && `Due ${formatDate(task.dueDate)}`}
secondaryTextColor={task.overdue ? 'error' : 'textSecondary'}
onClick={() => onClick(task)}
leftIcon={

Loading…
Cancel
Save