|
Posted by "messju mohr" on 06/13/05 16:18
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
[Back to original message]
|