0

I'm starting out with web design and I got a problem.

I have two date input fields and, the way the designer envisioned the site, they want the description of the input field to be inside it (the default text) so, instead of mm/dd/yy it should say CHECK-IN.

I managed to do this by setting the input type to text/date, but then I don't get the input restrictions I want. Can I get the placeholder to be text but the input to be restricted to date format?

Supperhero
  • 911
  • 1
  • 7
  • 24

1 Answers1

0

I found another question possibly related to this one. Try using this code:

<input placeholder="Date" class="textbox-n" type="text" onfocus="(this.type='date')"  id="date"> 

I tested it and it worked fine for me.


This is the original post i found it from

DarkDoom_0
  • 11
  • 3