[EXTENSION] Calendar

http://www.yiiframew…endar/#download

This extension is a calendar based on The Coolest DHTML Calendar

It's an easy to use, light and fast calendar with many options

Check a demo here:

http://spyros.agilit…?r=event/create

How should I modify the controller to get your demo work? Im total newb with Yii. Thanks for all help available!

The demo is here http://spyros.agilit…?r=event/create

You don't have to modify anything to get it work.

Doesn't it work for you?

I fixed a bug that madfe the widget useless in IE

The new version is available in the extensions section and the demo should be working in IE too

Hi, I'm having trouble declaring calendars in an ajax-replaced view inside of a page that already contains calendars. The calendars appear correctly but they fail to set their values in the specified fields. Before the ajax replacement, everything is fine. Can it be an ID issue ? If so, is there a way to set it manually ? Thanks for an awesome widget !

Can you see in the generated source after the ajax replace if 2 or more calendars have the same ID. Anyway I'll see if there's a way to set the calendars ids manually

I can see the source through firebug before and after the ajax replace but no ID for any of the calendars. Tell me if there is anything helpful that I can provide.

Please check after the ajax request if there's the input field in the calendar setup



Calendar.setup(


    {


      inputField       : 'calendar',


and that the input field ('calendar' in our case really exists)

Yes it seems to me that they are all associated with an existing input field.

Here is what I get from the firebug console in the ajax response :



<div class="simple">


    <label for="Visite_DATE_VISITE">Date de visite</label>


    <input name="Visite[DATE_VISITE]" id="Visite_DATE_VISITE" type="text" value="" />


    <script type='text/javascript'>


        Calendar.setup(


        {


            inputField : 'Visite_DATE_VISITE',


            ifFormat : '%d/%m/%Y'


        })


    </script>


</div>


I just noticed that though all this appears in the response, when I browse the code in the HTML tab of firebug, the script tags don't appear for the calendars that are part of the ajax-replaced part of the code.

The weird thing is that none of the calendars work after the replace, not even those that are "static" on the page (they work perfectly until the new calendars appear)

When I click on a date on any of the calendars after the replace, I get the following javascript errors :



too much recursion


setFullYear()()calendar.js (ligne 1797)


.....


(no script)()(eliding...1 frames) (ligne 0)


setFullYear()()calendar.js (ligne 1797)


.....


(?)()index.ph...e&id=1019 (ligne 1796)


(?)()index.ph...e&id=1019 (ligne 1721)


(?)()index.ph...e&id=1019 (ligne 597)


(?)()


d.__msh_oldSetFullYear(y);n


Any clue on how to solve this issue ?

maybe it has to do with this one:

http://www.yiiframew…2.html#msg14082

ajax replaced content doesn't seem to have the original functionality

Take a look at this:

http://www.yiiframework.com/forum/index.php?/topic/3246-jquery-event-not-attaching-in-dynamic-renderpartial/#entry18058

it may have a solution for the problem

Hey, Spyros, how you doing, mate?

I have some information about the “two-October, 17th” bug I’ve written here http://www.yiiframework.com/extension/calendar/reviews/

I’ve tried some combinations and found out that the problem only happens when there is some given date passed to the inputField. Also, if I click over the “Today” link in the calendar, it rebuilds the matrix of days in the right way…

The weirdest part is that here in Brazil, our Daylight Saving Time has begun coincidentally in October, 18h, which is exactly one day after the day which appears twice in the Calendar.

I’ve tried in your demo page at http://spyros.agilityhoster.com/demos/index.php?r=event/update&id=45 by changing the End Date of the record and the problem happens too.

Now I’m wondering if it is related to some config in my computer/server and the daylight saving time…

Please, let me know if it happens to you when you try the same record I’ve done at http://spyros.agilityhoster.com/demos/index.php?r=event/update&id=45

Thanks in advance

:)

It doesn’t happen to me. Must be due to Daylight saving time.

I will test it next week when there’s the DST day in Greece

I spyro I have a problem with your extension, dateStatusFunc don’t work properly I use so:

<?php $this->widget(‘application.extensions.calendar.SCalendar’,

array(

‘inputField’=>‘prenotazioni_partenza’,

“ifFormat” => ‘%d-%m-%Y’,

"dateStatusFunc" => "function(date) {if (date.getDay() != 0) {return true;} else {return false;}} ",

));?>

but nothing change have you a solution?

thanks.

I found by me the problem there’s an error in 482 Scalendar.php line you have to sostitute dateStatusFunc with _dateStatusFunc now works thanks.

Hi,

I’m new at extensions so please be gentle ;)

I downloaded calendar_1_22.zip and extracted it in protected/extensions

Then added to my _form.php

<?php echo CHtml::activeLabelEx($model,‘delivering_date’); ?>

<?php echo CHtml::activeTextField($model,‘delivering_date’,array(‘id’=>‘delivering_date’)); ?>

<?php $this->widget(‘application.extensions.calendar.SCalendar’,

[indent]array(

[indent]‘inputField’=>‘delivering_date’,

‘skin’=>$skin,

‘stylesheet’=>$style,

‘ifFormat’=>’%d-%m-%Y’,[/indent]

));[/indent]

?>

It works but the calendar spreads out across the entire available width of the window.

What am I missing?

Thank you.

Hi,

Is $skin and $style real variables that exist in your code?

If not comment these lines and check again

No, they don’t exist.

Commenting them doesn’t help.

Could you give me some quick instructions on how/where to set them?

Thanks.

I’ve just noticed that when I drag the calendar it moves up and down ok, but when moving left and right the righthand side of the calender is stays fixed against the right handside of the browser window.

I’m using the Epiphany browser that is powered by Gecko 1.8 (if that’s any help).

Cheers.