|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
mithuntnt Smarty n00b
Joined: 26 May 2009 Posts: 1
|
Posted: Tue May 26, 2009 1:35 pm Post subject: html_select_date: year only select expects format '--' |
|
|
I have a select for the year only.
Code: |
<{html_select_date
prefix=''
time=$current.year|default:'--'
end_year='-20'
start_year = '+5'
reverse_years=true
year_empty=''
display_days=false
display_months=false
}>
|
When some value is selected (say 2009 ) the Year parameter has the value '2009' (not 2009--). This behavior is favorable for me as i put the year directly into the database.
However when $current.year is given to smarty as '2009' for displaying, it is not able to display it.
Code: |
1 => Array (10)
id => "XX"
year => "2009"
|
My guess is it is expecting a 2009-- |
|
Back to top |
|
javier.cantero Smarty n00b
Joined: 02 Apr 2012 Posts: 1
|
Posted: Mon Apr 02, 2012 1:11 pm Post subject: |
|
|
Hi, have you found the solution for the default value?, I have the same issue, in the example below:
{html_select_date
prefix=txt_study_start_year$iteration
time=$current.year|default:'--'
end_year='-40'
start_year = '+5'
reverse_years=true
year_empty=$tssyy
display_days=false
display_months=false
}
Even though I replace the $current.year|default:'--' with $tssyy the value still doesnt take effect, is it a bug of the version Smarty-2.6.26?.
Thanks in advance. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|