I am using an input field to get a date which is stored as "yyyy-mm-dd" and I want to convert it to a more readable format to display with html, so 2000-05-03 will look something like May 3, 2000. Is there an easy way to do this?
>Solution :
Yes, you can use toLocateDateString() for it. And with the options format the date.
For your example it will be like this:
const date = new Date("2000-05-03");
date.toLocaleString('en-US', { year: 'numeric', month: 'long', day: 'numeric' })
console.log(date);
Will print May 3, 2000