I am having trouble to create a Date only Date Object when using the 'YYYY-MM-DD' input
When i use the following Code to create a new Date object
let date1 = new Date('2022-01-06')
let date2 = new Date('01/06/2022')
I get the following results
date1 = Wed Jan 05 2022 16:00:00 GMT-0800 (Pacific Standard Time)
date2 = Thu Jan 06 2022 00:00:00 GMT-0800 (Pacific Standard Time)
So its the same Input to create a new Date Object but i get different times. As i am storing my data in a json doc store its in the 2022-01-06 format and i need to get a date object back that has no Time just like Date2