Converting a string to a date in JavaScript
Assuming your date has a proper format parse a string to the date object.
new Date(your_string);
var date = new Date("2021-12-12");
console.log(date);
Assuming your date has a proper format parse a string to the date object.
new Date(your_string);
var date = new Date("2021-12-12");
console.log(date);