How to get current date time in vue js?

By Hardik Savani | June 14, 2019 | Category : Vue.JS

Do you want to get current date in vue js app. If yes then i will help you to getting current date and time in vue js app. if you know to get current date in javascript or jquery then you can get same way using Date Class. we can also display current date with yyyy-mm-dd format.

it is a very simple to get current date time in vue js because we can get it using Date(). Date() will provide full date and time with timezone. so you can also make better format like yyyy-mm-dd.

Bellow i gave you very simple example so you can understand how to display current date and time in vue app.


<!DOCTYPE html>



<title>How to get current date time in vue js? -</title>

<script src=""></script>



<div id="app">

{{ message }}



<script type="text/javascript">

new Vue({

el: '#app',

data: {

message:"Welcome, Please Wait...."



callFunction: function () {

var currentDate = new Date();


var currentDateWithFormat = new Date().toJSON().slice(0,10).replace(/-/g,'/');




mounted () {






I hope it can help you....

Hardik Savani
My name is Hardik Savani. I'm a full-stack developer, entrepreneur and owner of Aatman Infotech. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.
Follow Me: Github Twitter
***Do you want me hire for your Project Work? Then Contact US.

We are Recommending you: