Hey dev, here the blog all about How to Change Input Type Date Format dd-mm-yyyy. Input type “date” is a HTML by-default property.
So we can use the min and max property to get this required format.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | <!DOCTYPE html> <html> <head> <title> How to get input type date in dd-mm-yyyy format ? </title> </head> <body> <h1>Free Online Test Tutorials</h1> <h3> Get input date in dd-mm-yyyy format </h3> <label for="start"> Enter the Date: </label> <input type="date" name="begin" placeholder="dd-mm-yyyy" value="" min="1997-01-01" max="2030-12-31"> </body> </html> |