Re: [SMARTY] How to capitalize work with HTML_SELECT_DATE

"messju mohr" <[email protected]>
Newsgroups gmane.comp.php.smarty.general
Message-ID <20050613131852.GC28989@dune>
On Mon, Jun 13, 2005 at 08:29:44AM -0400, Reynier Perez Mira wrote:
> 
> Hi list:
> I try to create a SELECT contains DATE. Reading into Smarty Doc I found HTML_SELECT_DATE but I have some questions. For example if I use them in this way:
>  {html_select_date prefix="startdate" start_year="2000" end_year="+1"|capitalize}
> How I know in wich var I found days, months and years separately

in $_REQUEST['startdateDay'], $_REQUEST['startdateMonth'] and
$_REQUEST['startdateYear'].

> and why if I use capitalize the first letter contains in month select doesn't capitalize fine?

because you applied capitalize only to the end_year attribute and not
to html_select_date's output.

{html_select_date|capitalize prefix="startdate" start_year="2000" end_year="+1"}

would capitalize the whole ouput, but this also capitalizes the
html-tag and -attribute names, which is very likely not what you want.


IMHO you have these choices:

- live with capitalized tag-names and values, which may result in
funny side-effects.

- find a locale with capitalized month-names or build one.

- hack {html_select_date} to suit your need.

greetings
messju

> Take a look to my code:
> [PHP Code]
> <?php
> setlocale(LC_ALL,'esp_ESP');
> session_start();
> require(".././class/smarty/Smarty.class.php");
> $tpl = new Smarty();
> $tpl->template_dir  = "../themes/admin/";
> $tpl->compile_dir   = "../themes/themes_c/";
> $tpl->config_dir    = "../themes/config/";
> $tpl->compile_check = true;
> $tpl->display("admin_header.tpl");
> $tpl->display("configuracion.tpl");
> $tpl->display("admin_footer.tpl");
> ?>
> 
> Reynier Pérez Mira
> 3er. año Ing. Informática 

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.