Yii 1.1: jalalidatepicker

jquery date picker for persian calendar


Yii 1.1 or above


download and extract in Yii_root/protected/widgets

put this code in your view

  echo CHtml::textField('datepicker');

examle with model

  echo CHtml::activeTextField($model,'datepicker');


Total 20 comments

#19901 report it
Nabi at 2016/07/03 05:15am
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.

#18907 report it
hosein_sh at 2015/02/02 08:25am
خطای هنگام اجرا

سلام هنگام اجرا این داده میشود احتمالا فایلی ازش نباشه

The asset "F:\projec\yii_news1\protected\widgets\JalaliDatePicker\assets" to be published does not exist.
#15869 report it
msoa at 2013/12/25 01:43am
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');
#14120 report it
javad at 2013/07/21 02:12am

big like, plz update to new version

#12732 report it
wwwwww at 2013/04/09 01:02am
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...

#12714 report it
Shahcheraghean at 2013/04/08 01:15am
is it standard?

@wwwwww TNX. but is this way standard. if it is, what about extensions folder under protected?

#12711 report it
wwwwww at 2013/04/07 10:38am
widgets folder

just create widgets folder in protected directory. you may face future problems in case of changing predefined directory!

#12710 report it
Shahcheraghean at 2013/04/07 09:02am
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?

#12513 report it
wwwwww at 2013/03/25 11:49am
yii booster (bootstrap) problem

when loading bootstrap, Georgian is shown instead of Jalali, please help me!

#7565 report it
javad at 2012/03/30 09:15am


How can I put JalaliDatePicker instead DatePiker of (http://yiiframework.com/extension/yii-user)

thanks javad

#7564 report it
javad at 2012/03/30 08:57am
problem (true or false)
'changeMonth'=>'true' -> true
'changeMonth'=>'false' -> true
'changeMonth'=>'xyz' -> true
'changeMonth'=>'' -> false
#5257 report it
javed alam at 2011/09/27 03:21am
Time addtion

it will be great if time selection is also added in next release.

#4997 report it
naser at 2011/09/05 02:21am

@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.

#4991 report it
Hesam K at 2011/09/04 10:19am

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 :)

#4989 report it
naser at 2011/09/04 07:47am
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.

#4988 report it
Hesam K at 2011/09/04 07:21am
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 :)

#4845 report it
javed alam at 2011/08/21 03:59am
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.


#4785 report it
naser at 2011/08/16 04:48am
fixed bug

@javedkhan: tnx for reporting this bug. i fixed it.

#4784 report it
javed alam at 2011/08/16 02:38am
a lilltle problem

this extension is working fine. but i couldn't use it more than 1, in same page.

#4607 report it
naser at 2011/07/26 01:42am
give me your suggestion

if you test it plz give me your suggestions to improve it.


Leave a comment

Please to leave your comment.

Create extension