Link to home
Start Free TrialLog in
Avatar of asaidi
asaidi

asked on

date format in html

Hi
when i am writing a form in html i have a date field and i want to put in input type="text" name="date" size="10"  maxlength='10'  and at the same i want to put for example   /  /   to strict the user to use 07/06/2008 not an empty field otherwise the user can put anything 07.06.08 or he can put 07-06-08 etc...
Avatar of bluefezteam
bluefezteam

why dont you have 3 fields with 2 characters in each

[DD] / [MM] / [YY]

alternatively you could draw a back ground image with the /  /  drawn on it and apply it to your field and limit it to 6 characters in length....

[     /      /     ]
with the first method your form can then join the date together to the format you wish
DD/MM/YY
!!! obviously with the first method I am implying that you add the / / in between the fields as HTML text
Avatar of asaidi

ASKER

means  i add value in my input type
input type="text" name="date" size="10"  maxlength='10'  value '  /  /   '
ASKER CERTIFIED SOLUTION
Avatar of bluefezteam
bluefezteam

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial