methods:{
format_date(value){
if (value) {
return moment(String(value)).format('MM/DD/YYYY')
}
},
if (value) {
return moment(String(value)).format('MM/DD/YYYY')
}
},
format_time(row){
if (row) {
return moment(String(row)).format('h:mm A')
}
},
}
And then in template:
<template>
<div>
<div class="panel-group"v-for="(value,index) in list">
<div class="col-md-8">
<small>
<b>{{format_date(value.date) }}</b>
</small>
<small>
<b>{{format_time(row.date) }}</b>
</small>
</div>
</div>
</div>
</template>
OR
date: { label: 'Date',render:(data) =>{return this.format_date(data) ? this.format_date(data) : " " } },
<b>{{format_time(row.date) }}</b>
</small>
</div>
</div>
</div>
</template>
OR
date: { label: 'Date',render:(data) =>{return this.format_date(data) ? this.format_date(data) : " " } },
No comments:
Post a Comment