For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > June 2004 > Re: [SMARTY] Possible addition to html_select_date









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [SMARTY] Possible addition to html_select_date
Messju Mohr

2004-06-01, 4:44 pm

On Tue, Jun 01, 2004 at 08:11:32PM +0200, Martin Kjeldsen wrote:
> Hi,
>
> I would like to propose small change added to the html_select_date. There is
> a uncommented param to the function which enables you to add a "header" to
> the select field. E.g. to write Day as first value in the input by setting
> the day_empty param. But the problem is you can't select this and then it
> doesn't make much sense.


you can select it, by setting that part of the time-attribute to empty.

{html_select_date day_empty="please select" time="2004-06-"}
selects june 2004, but no dasy


{html_select_date day_empty="please select" time="--"}
selects nothing, but january and 2004 seem to be selected since they
have no empty_*-attribute set.


you cannot make the value unselected if you pass a timestamp though.



> You can set the values selected in the selected by
> passing e.g. a timestamp to the function but 0 or -1 doesn't work as
> smarty.make_timestamp returns time(). So if the functions allow a param
> called day_sel the function could use that as the selected instead.
>
> I have the code ready to be added...
>
> Cheers
>
> Martin
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com