PDA

View Full Version : add year to the date



mero
31 May 2011, 10:12 AM
Hello
I have form like this


<form name"form1">
<input type="text" name="year1" id="year1" />
<select name="status" >
<option value="year">add year</option>
<option value="month">add month</option>
<option></option>
</select>
<input type="text" name="year2" id="year2" /> </form>
i want to add date at the first textfield(year1)at format"Y-m-d" and when choose from dropdown menu add year or month
and display it at the second(year2) in the same format"Y-m-d"
any help?