moment parse string to date
snippet in javascript

moment parse string to date

user9822

const myDate = moment(str, 'YYYY-MM-DD').toDate();