converting time with momentjs code example
Example 1: moment to date
moment().toDate();
Example 2: moment set time
const date = "2017-03-13";
const time = "18:00";
const timeAndDate = moment(date + ' ' + time);
console.log(timeAndDate);
moment().toDate();
const date = "2017-03-13";
const time = "18:00";
const timeAndDate = moment(date + ' ' + time);
console.log(timeAndDate);