calendar
really good calendar extension
This "calendar" is much better in my opinion then the only other viable alternative, jui.EDatePicker.
The EDatePicker although useable with some minor code modifications, is really very basic with a crude graphical user interface.
This calendar however offers EVERYTHING and it works great without any modifications. The graphical user interface is intuitive and very advanced as well as easy to control. Thanks!
really good calendar. having time editing is really cool. 10x :)
Liked it and planed to use for the flat & flatCallback options it provides, but ..
Now wondering how to use this?
function dateChanged(calendar) {
if (calendar.dateClicked) {
var y = calendar.date.getFullYear();
var m = calendar.date.getMonth();
var d = calendar.date.getDate();
window.location = "/" + y + "/" + m + "/" + d + "/index.php";
}
There was an error in the SCalendar.php You should change line 486 from
if(isset ($this->_flatCallback)) $prop .= "flatCallback : '$this->_flatCallback',\n";
to
if(isset ($this->_flatCallback)) $prop .= "flatCallback : $this->_flatCallback,\n";
Then the calendar has to be a flat one Then use this code
<script type="text/javascript"> function dateChanged(calendar) { // Beware that this function is called even if the end-user only // changed the month/year. In order to determine if a date was // clicked you can use the dateClicked property of the calendar: if (calendar.dateClicked) { // OK, a date was clicked, redirect to /yyyy/mm/dd/index.php var y = calendar.date.getFullYear(); var m = calendar.date.getMonth(); // integer, 0..11 var d = calendar.date.getDate(); // integer, 1..31 // redirect... window.location = "/" + y + "/" + m + "/" + d + "/index.php"; } }; </script> <div id="calendar-container"></div> <?php $this->widget('application.extensions.calendar.SCalendar', array( 'flat'=> 'calendar-container', 'ifFormat'=>'%Y-%m-%d', 'flatCallback'=>'dateChanged' ));
WOW.!! Thank you so much to the Author
I found that all the boolean parameters causes a javascript error if they are used (true or false), they are: singleClick, weekNumbers, showsTime, electric, cache, showOthers The problem is that they must be passed to js surrounded by '' So you should substitute in the createMarkup function of SCalendar.php the 6 rows of the above parameters from:
if(isset ($this->_PARAMETER)) $prop .= "PARAMETER : $this->_PARAMETER,\n";
to
if(isset ($this->_PARAMETER)) $prop .= "PARAMETER : '$this->_PARAMETER',\n";
If you want to manage the 'Step' parameter that is contemplated in DHTML Calendar for change the step between years in the drop down list (default=2) you must make these changes to SCalendar.php:
In the begin add to the other parameters: /* @var $_step Integer private $_step;
Add this new function: /*** * @param integer $step */ public function setStep($step) { if(is_numeric($step) && ($step >-1)) { $this->_step = $step; } else { $this->_step = 2; } }
Add in createMarkup function: if(isset ($this->_step)) $prop .= "step : $this->_step,\n";
Hey, guys,
I'm using the following code:
Yii 1.0.9, Linux, Firefox 3.5
The calendar object is shown fine, but 17th, October (today) is shown twice, in Saturday and Sunday...and it changes all the rest of month...any idea on how to solve this bug?
Thanks!!
Hi, What is the value of the $style and $skin you use? Also check the jscalendar's home page to see if the bug happens there too. http://www.dynarch.com/static/jscalendar-1.0/simple-1.html
If you have any other questions please post them in the forum thread http://www.yiiframework.com/forum/index.php?/topic/2337-extension-calendar/
Hi,
I think you shouldf add the following code at ca. line 509 in SCalendar.php:
if(isset ($this->_language)) $prop .= "language : '$this->_language',\n";
Regards,
Joachim
Please give me just one full working example with following missing data for: $event = ? $skin = ? ("aqua"?) $style = ? ("blue"?) Thanks,
New Review
Please login first.
