Yii 1.1: wdforyii

WDCalendar for Yii

WD Calendar for Yii

This is a Yii framework module that implements WD Calendar (http://sourceforge.net/projects/jqeventcalendar/).

WD Calendar


Yii 1.1.7 (tested)

MySQL DB Connection


Step 1) extract the content under protected/modules

Step 2) Set your configuration file protected/config/main.php

    'modules' => array(
        'wdcalendar'    => array( 'admin' => 'install' ),

Step 3) Visit http://yoursite.com/wdcalendar (or http://yoursite.com/index.php?r=wdcalendar) and follow the installation steps.

Step 4) Enjoy Your WD Calendar :)


You can either embed the calendar in your own design, or leave it to display full screen (default)

    'modules' => array(
        'wdcalendar'    => array( 'embed' => true ),

You can also set WD specific options

    'modules' => array(
        'wdcalendar'    => array( 
                                'wd_options' => array(  
                                    'view' => 'week',
                                    'readonly' => 'JS:true' // execute JS


Click here to see it in action






v.0.1 - 06/24/2011

  • comes with the basic WD features, create/delete/update,
  • drag-and-drop events,
  • can be embedded into layout

Total 16 comments

#19106 report it
Dhara at 2015/03/18 03:54am
Dropdown doesn't work in crome


Nice extension.It fulfill my requirements. I did little modification. i changed textbox to dropdown. It works perfect in mozilla.but in crome it doesn't support. Dropdown is not selectable. In jquery.calender.js i tried to find the issue but i failed. Any solution ?

#17162 report it
xJose at 2014/05/08 03:26pm
dashboard in a view

hey this is a great module I really liked it, I have a question, how can I put this module in a view? like for example 'applicaction/usuario/dashboard ? please I really need it

#16511 report it
nkdos at 2014/03/01 12:20am
amazing module

Thank you very much! I found this amazing module. I just have a question, I need to install this module 2 times as I need an editable version, and other read-only. How can I do this?

I have the following question. As I can go directly to the event addDetails?

[SOLVED] _When I try to change the name to "recorder" get the message "Alias" recorder.RecorderModule "is invalid. Make sure it points to an existing PHP file and the file is readable." _

Best Regards

#15752 report it
omeraslam at 2013/12/12 08:19am
Recurring Events

Hi, i see there is a db field created for the recurring rules for the events but there is no option where i could select the recurring rules for the events, has anybody implemented it, any help will be appreciated regards, Omer Aslam

#13186 report it
ruderbytes at 2013/05/12 10:18pm
reallt cool

wow this is so great. i don't know great module before. this is so cool. thank you :)

#10985 report it
hiral darji at 2012/12/08 04:14am
want to use on dashboard module


this is very nice extension. i want to put it on my dashboard. i search a lot but i cant find out the way how i put this wdcalendar in dashboard module..

anybdy have solution?

thanks in advance.

#9436 report it
Stageline at 2012/08/10 07:04am
required events array fields

Hy. How can i determine what fields are required in events array? ( datafeed.php listCalendarByRange() )

#8664 report it
Nacesprin at 2012/06/18 04:31am
Good module!

Hello imehesz, congratulations for the good wdcalendar for yii implementation. It is very valuable for me!

#7417 report it
frocco at 2012/03/21 03:09pm
Display logged in user events only

I modified datafeed.php to use Yii::app()->user->id when adding/updating/deleting/retrieving of data. Added user_id (int) to data table.

Happy to share.

#7416 report it
frocco at 2012/03/21 03:06pm
Delete in Edit.php fails

It seems the value is hard coded to 8

I replaced the value with [code] if (confirm("Are you sure to remove this event")) {
var param = [{ "name": "calendarId", value: <?php echo isset( $event ) ? $event->Id : '' ?>}]; [/code]

#4961 report it
imehesz at 2011/09/01 09:34am
re: RE: senity


Thank you very much for taking your time and giving me a detailed explanation. I (more or less) completely agree with you on everything.

When I originally looked around for a usable calendar for Yii, I simply could not find one. Period. They were either too slow, or they looked like they were from the 90s (which was a long time ago in computer years :) ). And fortunately/unfortunately I found this one to be OK, not perfect, but it did the job.

Obviously this is not for everybody, but if you need a modern looking calendar in about 10 minutes, there you go.

On the development side, I really don't want to change the way WD handles their internal SQL/PHP stuff (or the DB schema, column properties etc) simply because when a new release comes around (with new features, hopefully soon) I should be able to just plug-n-release. Is this the best approach? Maybe not.

In the future I might release a new extension, that uses WD only for displaying, and handle the internal stuff through Yii (with AR, permissions, table prefixes etc) but it won't happen for a while.

Oh, and if you managed to have a good Yii calendar, maybe you should release it as an extension ;)

thanks again, --iM

#4932 report it
Da:Sourcerer at 2011/08/30 11:36am
RE: sanity

Well, thanks for your explanations. Still, I'm not very convinced. I'd love to provide patches but I am currently working on a payed, closed-source project for which I am writing a spanking new implementation, so that's right off.

So then, I am (and were) totally aware that you are not the person behind JQ Calendar. However, it came to my attention that you took JQ Calendar's demo code and shove it into a Yii module. This approach is very problem-laden, especially since JQC's php-code isn't exactly top-notch. Anyway, JQC is a js-library. Hence, the supplied demo-code should be neglected. Some hints:

  1. Your installation process consists of creating a single table. There are way better methods than having a separate controller for just that (see CDbLogRoute and CDbHttpSession for that)
  2. The table name is hardcoded. This means, there can only be a single calendar throughout an entire application. Please consider using a placeholder for that. This would also allow table names blending into existing naming conventions (e.g. erp_calendar instead of jqcalendar)
  3. All SQL operations are being routed through a separate db-connection, totally bypassing Yii's existing one. This does not only add additional overhead, it also forces you to use MySQL. If you must ignore such fine features as Yii's fine concept of Active Records, at least use its query builder in order to issue (mostly) RDBMS-agnostic commands.
  4. If you'd like to render partial views (suach as the edit form), use CController::renderPartial() instead of applying a new theme.
  5. Please stop using die(). Yii::app()->end() is the way to go.
  6. Yii provides some excellent services for dealing with values in JavaScript/JSON. Just see the CJSON and CJavaScript classes and use them.
  7. More of an extra: The existing table design might be lacking a BTREE index on the StartTime field. Lookups will be much faster for larger datasets. Also, consider renaming some of the fields to something that makes more sense. xTime for a field holding a DATETIME is outright evil.
  8. If you must operate on date values, try to make use of PHP's superb DateTime class. You'll find the parse-, format- and modify-functions most useful.
  9. Lastly, stop being so obsessed with modules. Try putting everything in a widget, instead. Right now, if I'd want to display a calendar at more than one place, it would be close to impossible.

So, the monkey-poop thing still stands. The module might be good enough for people who just need something that works more or less out-of-the box. For everybody else, it is entirely unusable.

#4841 report it
imehesz at 2011/08/20 06:20pm


thank you for your kind words, very nice :)

I did NOT write WD Calendar! I just ported it over so it can be used for Yii projects. It was NOT written for Yii, it was (and it IS) a stand alone PHP, JQuery calendar. So obviously it has nothing to do with templates or DB layers etc

Could it be improved? Of course it could. Just like anything else. I'd be more than happy to apply your patches, but I want to keep the code as close to the original as possible, so when a new jQuery extension arrives, I can easily update this module.

Thanks again, --iM

#4731 report it
Da:Sourcerer at 2011/08/09 10:24am
What the bloody hell?

Were you on prescription meds while writing this module? While trying to make use of it, I might have lost a good portion of my sanity. Why on earth would you go and try to bypass everything good and/or established that comes with Yii? Such as its template engine? And its database abstraction layer? Most of the time I've spent digging through your code, I were under the impression a chimp smeared his doo-doo over a keyboard. Please fine sir, consider putting this module out of its misery, burry it in your backyard and start anew. The way it is, there is absolutely no way this could be included into a project that - once released - doesn't make pandas cry.

#4372 report it
imehesz at 2011/06/30 09:26am
thank you

hello, and thank you!

Recurring events are currently not supported, but they say on their site here that it's in the works.


#4371 report it
Tibor Katelbach at 2011/06/30 04:00am
super module

Hi , The module is nicely functional I would love to see a frequency (repeat feature like Google Cal) maybe it's there butI didn't see it great work

Leave a comment

Please to leave your comment.

Create extension