I am new to symfony. In some page that already existed, I've been tasked to
fix a bug. There is this block of code:

<?php echo select_month_tag('bmonth', null, 'include_custom='.__('Month'),
array('style'=>'margin-left: 10px;')) ?> - 
<?php echo select_day_tag('bday', null, 'include_custom='.__('Day')) ?> - 
<?php echo select_year_tag('byear', null, array('year_start'=>'1900',
'year_end'=>'2008', 'include_custom'=>__('Year'))) ?>

But what happens is that when we load the page, the select boxes are all set
to the current date values. If I put "1" instead of "null", they obviously
go to January 1st. I want them to each be defaulting to the top option of
"Month", "Day" and "Year" so the user must choose the proper values.

What gives?

http://www.symfony-project.org/api/1_0/DateFormHelper#method_select_month_ta
g

By default, the $value parameter is set to today&apos;s month. To override
this, simply pass an integer (1 - 12) to the $value parameter. You can also
set the $value parameter to null which will disable the $value, however this
will only be useful if you pass &apos;include_blank&apos; or
&apos;include_custom&apos; to the $options parameter.

(also, what's with the &apos; in the docs? Can't someone fix those? Why even
use that at all - just use ' and avoid this messy output)



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to