I am looking for a solution to provide a user with a friendly field that formats the date accordingly to what they type. I noticed a lot of applications have it set up like that. So for example when a user types the first two numbers it will then insert a /. I am open to any suggestions. Thank you. This is just a standard input type:
<input type="text" name="input" placeholder="MM/DD/YYYY" required
pattern="(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))"
title="Enter a date in this format MM/DD/YYYY"/>