I am trying to provide a default value for a TimePicker object. But the that value I have is a string e.g "12:00 PM" And the picker needs a Date object.
I tried parsing the time directly into a Date object like shown below, but it does not work
let startTime = new Date("12:00 PM");
How can i convert this time string into a Date object so that i can provide the default value to the TimePicker.