i need to try for the drop down with name of the month , the day and year in other loop,s
i try to conver the mm loop in string format,example the first month is jan and the value is 1
output will be below
<option value=1>jan</option>
i use the following code
<select name="dd" id="dd">
<option value="">Day</option>
{for $foo=1 to 31}
<option value="{$foo}">{$foo}</option>
{/for}
</select>
<select name="mm" id="mm">
<option value="">Month</option>
{for $foo=1 to 12}
<option value="{$foo}">{$smarty.now|date_format:"%b"}</option>
{/for}
</select>
<select name="yy" id="yy">
<option value="">Year</option>
{for $foo=1970 to {$foo|date_format:"%Y"}}
<option value="{$foo}">{$foo}</option>
{/for}
</select>
ple help me ..
You might be interested in {html_select_date}.
will generate HTML like
Hint: Set the
time="2011-05-17"parameter to have that date selected.