This extension is a widget that creates date dropdowns. It can display any or all of year, month, and day.
Based on the Smarty function {html_select_date} http://www.smarty.net/manual/en/language.function.html.select.date.php
Documentation ¶
Requirements ¶
- Yii 1.0 or above
Installation ¶
- Extract the release file under
protected/extensions
Usage ¶
See the following code example:
<?php $this->widget('application.extensions.EHtmlDateSelect',
array(
'time'=>$model->dateField,
'field_array'=>'ItemsDate',
'prefix'=>'',
'field_order'=>'DMY',
'start_year'=>2010,
'end_year'=>2012,
)
);?>
Change Log ¶
March 26, 2010 ¶
- Fixed some errors
March 23, 2010 ¶
- Initial release.
User Contributed Notes 7
Just what the dr ordered
Cool extension... just what I needed. Thanks!
~thinkt4nk
Very Handy =)
This was quite easy to implement and saves a lot of repitative 'grunt work', thanks!
Hook to model?
It would be very nice to see this hooked into a model and able to pull currently selected value from the model.
@kosenka
Very nice extention. I would recommand for next release to have:
'model' => $model,
'attribute' => 'birthdate',
instead of:
'time'=>$model->birthdate,
'field_array'=>'ItemsDate',
and a Behavour to recompose date onBeforeValidate
Nice job, thanks
Matching names
Small matter, but the name of the extension does not match the name of the extension directory.
Extension directory: ehtmldatAselect
Extension name: ehtmldatEselect
(capitalization added for emphasis)
Feb 2011 showing 31 days
Hi , Thanks for this extension . But in my test it is still showing 31 days for February month . Does it supposed to show based on the month and the year selected . Could you please advise or Am I doing some thing wrong ?
Thanks
Yii Fan
on update not selecting year
i used the extension to select only year.
but in the update its not showing as selected if the year greater the 2000. its only working till 1999.
Leave a comment
If you have any questions, please ask in the forum instead.
Join the conversation to share a note.