Requirements ¶
Yii 1.1 or above
Usage ¶
download and extract in Yii_root/protected/widgets
put this code in your view
<?php
echo CHtml::textField('datepicker');
$this->widget('application.widgets.JalaliDatePicker.JalaliDatePicker',array('textField'=>'datepicker',
'options'=>array(
'changeMonth'=>'true',
'changeYear'=>'true',
'showButtonPanel'=>'true',
)
));?>
examle with model
<?php
echo CHtml::activeTextField($model,'datepicker');
$this->widget('application.widgets.JalaliDatePicker.JalaliDatePicker',array(
'model'=>$model,
'textField'=>'datepicker',
'options'=>array(
'changeMonth'=>'true',
'changeYear'=>'true',
'showButtonPanel'=>'true',
)
));?>
Resources ¶
- [Project page] [github](https://github.com/na3r/jalali-date-picker---yii-widget-- "github")
your extension name is very attractive!
@Naser kholghi,i just download your jalali script to give for try,hope it will be jalali!
give me your suggestion
if you test it plz give me your suggestions to improve it.
tnx
a lilltle problem
this extension is working fine.
but i couldn't use it more than 1, in same page.
fixed bug
@javedkhan: tnx for reporting this bug. i fixed it.
A bug
Thanks for the fix.
in my view the extension was working fine, but when i used CJuiDialog widget, the date comes in Georgian instead of jalali.
when i look at the source code the CJuiDialog widget loads the default jquery ui js files. it didn't load the js files of the jalalidatepicker widget.
Regards
about mentioned bug
I have the same problem, it doesn't work when is used more than once in a form, have you fixed this bug? :-?
by the way, thanks for your valuable work :)
bug was fixed
@hesam.khaki i've fixed that bug. you can download new version from github or download from this page. i've added download link.
thanks!
yyeepp! now it's working!
but I have another problem here, when I try using this extension beside CJuiDatepicker, which is default datepicker of Yii, none of them works properly! years become gregorian and months remain jalali!
how can I fix this one?!
thanks for your attention :)
jquery-ui
@hesam.khaki this widget utilizes an edited jquery-ui. so when you want using my widget with another widget from zii like CJuiDatepicker , jquery-ui loads twice and it makes problem.
i'm gonna fix this issue soon.
Time addtion
it will be great if time selection is also added in next release.
problem (true or false)
'changeMonth'=>'true' -> true 'changeMonth'=>'false' -> true 'changeMonth'=>'xyz' -> true 'changeMonth'=>'' -> false
Replace
hey
How can I put JalaliDatePicker instead DatePiker of (http://yiiframework.com/extension/yii-user)
thanks
javad
yii booster (bootstrap) problem
when loading bootstrap, Georgian is shown instead of Jalali, please help me!
usege of jDateTime
This extension has pure wiki.
In Github repository has been said, "download and extract in Yii_web_root/protected/widgets", but there is no 'widgets' folder overthere.
Now, Should i copy it in /protected/extensions?
widgets folder
just create widgets folder in protected directory. you may face future problems in case of changing predefined directory!
is it standard?
@wwwwww TNX. but is this way standard. if it is, what about extensions folder under protected?
Antonio Ramirez SAID:
Posted 08 March 2011 - 04:06 AM
Extension: I create an extension when I implement a feature that is not on the library and 'extends' its functionality from an already built component or a new one. An extension can be anything... (helper, widget, behavior, child object... whatever).
Widget: I create widgets when is mostly related to HTML elements to be rendered. I take advantage of its live process: init() , run(), beginContent(), endContent(), etc... In order to render the elements. Those elements can be anything from Clips, Portlets, to Lists and even Grids.
Helper: If you look on CHtml object you will clearly understand what is a helper
look at : Your text to link here...
tnx
big like,
plz update to new version
Don't any thing
Thank for effort,
With following code nothing will displayed, only an empty text field is shown. what's the problem?
<?php echo $form->textField($model,'expiration_date_by_user'); $this->widget('ext.JalaliDatePicker.JalaliDatePicker',array( 'model'=>$model, 'textField'=>'expiration_date_by_user', 'options'=>array( 'changeMonth'=>'true', 'changeYear'=>'true', 'showButtonPanel'=>'true', ) )); ?>
خطای هنگام اجرا
سلام
هنگام اجرا این داده میشود
احتمالا فایلی ازش نباشه
The asset "F:\projec\yii_news1\protected\widgets\JalaliDatePicker\assets" to be published does not exist.
This widget is not compatible with latest jquery 1.11 for now.
This widget is not compatible with latest jquery 1.11 for now.
TypeError: $.browser is undefined if($.browser.msie && parseInt($.browser.version,10) < 7 && !inst.inline){
The .browser call has been removed in jquery 1.9 (+)
Please upgrade it.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.