I have a time as a string like "10:00pm" and I need to convert it into a date object so it can be represented in an input type="time" tag. Im using angularjs to model it.
I get an error saying "Expected 10:00am
to be a date". How can I convert "10:00am" into a date object? I haven't been able to figure it out. Any help is appreciated.
I only need the time