Best way to autoformat and validate time input

Hi all,

I am building a application which will allow a user to enter time in 2 formats into an input field.

eg 1.1 or 01:22 and not limited to 24hrs

I am wondering if ionic has someting that can auto validate and format when a user enters these or if any type of npm package exists for this?

Thanks for your help