Yii 1.1: gcalendar

A widget based on JS Calendar (version 2.1)
5 followers

This is a simple widget calendar based on JS Calendar

Requirements

Test on Yii 1.1.10

Usage

A calendar in Germany language:

<?php echo $form->labelEx($model,'effective_from'); ?>
<?php echo $form->textField($model,'date_of_birth',array('id'=>'effective_from')); ?>
   <?php 
        $this->widget('ext.gcalendar.GCalendar',array(
                                   'model' =>$model,
                                   'theme' => 'gray',
                                   'inputField'=>'effective_from', 
                                   'daFormat'=>'yyyy-mm-dd hh:ii',
                                   'languageCode' => 'ge',    
                               )
                     ); 
                ?>          
<?php echo $form->error($model,'effective_from'); ?>
  • model: model of form
  • inputField: id/name of textfield
  • theme: optional default='blue' , other support theme gray, light-cyan,zune
  • daFormat: optional the string format tell what it it :) (e.g yyyy=2012, mm=08, dd=20, hh:04, ii=17) now support three string delimit "-","/", & "./"
  • languageCode: optional (default='en') calendar language configuration

Demo Picture

Jcalendar

Resources

Home Page

Change Log

20, August 2012

- Version 1

Support for more language: en = english, fi=finish, sv=swedish, pt-br=brazilain portuguese, ge = german, no = norwegian,nl = dutch, es = spanish, pt-br = portuguese, fr = french, da = danish, hu = hungarian
14, August 2012

- Initial Release

I have removed my initial version since there are some bug & CSS issue plz refer to version 1 instead

Forum

Join discussion

Total 3 comments

#12408 report it
pod2g at 2013/03/18 10:44pm
Re: Calendar is not showing

Yes, Amjad Khan. This is a known bug from JSCalendar itself..
I have changed to use Calendar/Date Picker from http://www.dynarch.com/projects/calendar for my project.
Unfortunately just checked the site is temporary down. But i still have source code compile into an extension i can share if you are interested via email...

#12399 report it
DerekC at 2013/03/18 09:20am
Not a calendar...

In my view this is a datePicker not a calendar.

#11167 report it
Amjad Khan at 2012/12/21 04:09am
Calendar is not showing

if the text field is already filled suppose with "current date" then the calendar will not show the required results i.e in case of inserting value in textField the calendar will not show the required results.

<?php 
$form->textField($model,'enddate',array('id'=>'effective_from','value'=>date('l, d  F, Y', $dateOneMonthAdded))); ?>

Similarly in case of the following dateformat the gcalendar cannot pick the date

'daFormat'=>'l, d  F, Y hh:ii',

Leave a comment

Please to leave your comment.

Create extension