feat: Change the date format display in widget (#1528)

Co-authored-by: Pranav <pranav@chatwoot.com>
This commit is contained in:
Muhsin Keloth
2020-12-24 05:23:47 -08:00
committed by GitHub
parent 677f56f802
commit 3e61ea5cfa
7 changed files with 70 additions and 17 deletions

View File

@@ -1,10 +1,11 @@
<template>
<div class="date--separator">
{{ date }}
{{ formattedDate }}
</div>
</template>
<script>
import { formatDate } from 'shared/helpers/DateHelper';
export default {
props: {
date: {
@@ -12,6 +13,15 @@ export default {
required: true,
},
},
computed: {
formattedDate() {
return formatDate({
date: this.date,
todayText: this.$t('TODAY'),
yesterdayText: this.$t('YESTERDAY'),
});
},
},
};
</script>