|
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 |
Rudloff Smarty n00b
Joined: 06 May 2015 Posts: 2
|
Posted: Wed May 06, 2015 10:18 am Post subject: Can't prevent date selection in {html_select_date} |
|
|
Hello,
The doc for {html_select_date} says that we can prevent date selection by passing NULL but it does not seem to work.
I do pass NULL:
Code: |
$smarty->assign(
array(
'dateOfBirth'=>null
)
);
|
but it still selects the current date.
Regards, |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Wed May 06, 2015 9:39 pm Post subject: |
|
|
you did not show your template code.
But the time attribute must be null like
Code: | {html_select_date time=null... } |
It does work. |
|
Back to top |
|
Rudloff Smarty n00b
Joined: 06 May 2015 Posts: 2
|
Posted: Thu May 07, 2015 7:44 am Post subject: |
|
|
I found the problem.
I was doing
Code: | {html_select_date time="$dateOfBirth" all_empty=""} |
instead of
Code: | {html_select_date time=$dateOfBirth all_empty=""} |
I guess that's because is requires null and not an empty string. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu May 07, 2015 4:58 pm Post subject: |
|
|
Yes, you are right. If you pass a variable as attribute you should never use quotes. |
|
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
|