This question answers how to convert HH:mm:ss
string into a Javascript date object. The string returned from HTML time input is not always in the HH:mm:ss
format. The format varies.
The answers in the linked question will not work in-case of dynamic formats.
How to create a Javascript date object from this input value which does not have a fixed format?