Re: [SMARTY] html_select_date add on
| From: | Ajay Sharma | Date: | Tue, 09 Sep 2003 23:48:39 +0000 |
| Subject: | Re: [SMARTY] html_select_date add on | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-10185@lists.php.net to get a copy of this message | ||
On Tue, 2003-09-09 at 13:40, Andrew S. Nagy wrote:
> Is there a way to get the first option in the selects to be blank?
>
> <select name="Day">
> <OPTION LABEL="" VALUE=""></option>
> <option label="01" value="1">01</option>
> ...
> </select>
>
> I want to allow my users to choose an optional date, so if they don't want
> to pick the date, they can choose a blank date. Right now I am using a
> check box to determine if they want to use it or not (since it defaults to
> today's date), but that is not intuitive.
I was going to write a "me too!" reply but then I thought I'd take a
look at the plugins/function.html_select_date.php and see how hard it
would be to code it myself. I was able to code the feature that you're
looking for in about 30 minutes(!!). Anyway, here's a question though:
By default if you don't specify a 'time' parameter smarty uses the
current date. How do you want to tell it to use the blanks instead of
the current time?
later,
ajay