Write your own filter: https://vuejs.org/guide/custom-filter.html
Jun 22, 2016
6
Level 2
How to change date format in Vue Js?
Using Vue JS and Laravel data is fetching from table and listing in a view page. At-present date format is getting like '2016-06-05 16:41:00'. But I need to change the date format to '05-06-16' in view page. Please help me to change the date format using Vue Js.
<td>@{{ religion.created_at }}</td>
#sample view code
<tr v-for="(index, religion) in religions | orderBy 'id' -1">
<td><input type="checkbox" id="checkbox" aria-label="checkbox" value="checkbox"></td>
<td>@{{ index + 1 }}</td>
<td>@{{ religion.religion | capitalize }}</td>
<td v-if="religion.status == 'publish'">
<span class="glyphicon glyphicon-ok"></span>
</td>
<td v-else>
<span class="glyphicon glyphicon-remove"></span>
</td>
<td>@{{ religion.created_at }}</td>
<td><button type="button" class="btn btn-default" @click="EditReligion(religion.id)">
<span class="glyphicon glyphicon-pencil" aria-hidden="true" data-toggle="tooltip" data-placement="left" title="Edit"></span>
</button>
<button type="button" class="btn btn-default" @click="removeReligion(religion.id)">
<span class="glyphicon glyphicon-trash" aria-hidden="true" data-toggle="tooltip" data-placement="right" title="Delete"></span>
</button>
</td>
</tr>
Please or to participate in this conversation.