get time with moment.js code example
Example 1: moment set time
const date = "2017-03-13";
const time = "18:00";
const timeAndDate = moment(date + ' ' + time);
console.log(timeAndDate);
Example 2: how to get current time using moment
var startDate = moment().subtract(1, 'days'); //one day before the current time