Coder Social home page Coder Social logo

yii2fullcalendar's Introduction

yii2fullcalendar

JQuery Fullcalendar Yii2 Extension JQuery from: http://arshaw.com/fullcalendar/ Version 4.0.2 License MIT

JQuery Documentation: http://arshaw.com/fullcalendar/docs/ Yii2 Extension by [email protected]

A tiny sample can be found here: http://yii2fullcalendar.beeye.org

Latest Stable Version Build Status Code Climate License

Installation

Package is although registered at packagist.org - so you can just add one line of code, to let it run!

add the following line to your composer.json require section:

  "philippfrenzel/yii2fullcalendar":"*",

or run:

$ php composer.phar require philippfrenzel/yii2fullcalendar "*"

And ensure, that you have the following plugin installed global:

php composer.phar global require "fxp/composer-asset-plugin:~1.0"

Changelog

17-04-2019 Updated to latest 4.0.2 Stable Version of the library 19-01-2017 Updated to include non-standard fields 29-11-2014 Updated to latest 2.2.3 Version of the library

Usage

Quickstart Looks like this:

  $events = array();
  //Testing
  $Event = new \yii2fullcalendar\models\Event();
  $Event->id = 1;
  $Event->title = 'Testing';
  $Event->start = date('Y-m-d\TH:i:s\Z');
  $Event->nonstandard = [
    'field1' => 'Something I want to be included in object #1',
    'field2' => 'Something I want to be included in object #2',
  ];
  $events[] = $Event;

  $Event = new \yii2fullcalendar\models\Event();
  $Event->id = 2;
  $Event->title = 'Testing';
  $Event->start = date('Y-m-d\TH:i:s\Z',strtotime('tomorrow 6am'));
  $events[] = $Event;

  ?>

  <?= \yii2fullcalendar\yii2fullcalendar::widget(array(
      'events'=> $events,
  ));

Note, that this will only view the events without any detailed view or option to add a new event.. etc.

Non-Standard fields

You can add non-standard fields via the non-standard fields array, for which you can pass any key/value pair, as described in the Event Fields documentation.

So, using the Quick Start example above, you can read field1 and fields2 in your JavaScript using notation similar to event.nonstandard.field1 and event.nonstandard.field2.

AJAX Usage

If you wanna use ajax loader, this could look like this:

20171023 ajaxEvents are replaced by events - pls. check fullcalendar io documentation for details

<?= yii2fullcalendar\yii2fullcalendar::widget([
      'options' => [
        'lang' => 'de',
        //... more options to be defined here!
      ],
      'events' => Url::to(['/timetrack/default/jsoncalendar'])
    ]);
?>

and inside your referenced controller, the action should look like this:

public function actionJsoncalendar($start=NULL,$end=NULL,$_=NULL){

    \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;

    $times = \app\modules\timetrack\models\Timetable::find()->where(array('category'=>\app\modules\timetrack\models\Timetable::CAT_TIMETRACK))->all();

    $events = array();

    foreach ($times AS $time){
      //Testing
      $Event = new \yii2fullcalendar\models\Event();
      $Event->id = $time->id;
      $Event->title = $time->categoryAsString;
      $Event->start = date('Y-m-d\TH:i:s\Z',strtotime($time->date_start.' '.$time->time_start));
      $Event->end = date('Y-m-d\TH:i:s\Z',strtotime($time->date_end.' '.$time->time_end));
      $events[] = $Event;
    }

    return $events;
  }

yii2fullcalendar's People

Contributors

01tylerwilson avatar acerix avatar akorinek avatar alhimik45 avatar almix avatar antoninslejska avatar chrisschd avatar cicsolutions avatar encryptedroot avatar giaduy avatar hmphu avatar maczkop avatar markebjones avatar mmelcor avatar paskuale75 avatar philippfrenzel avatar qdii avatar rumours86 avatar sosojni avatar whatthebuild avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yii2fullcalendar's Issues

Can not get the Callback functions such as eventClick, eventResize

Hi Phil,
I cannot get the event callback functions work. Could you please tell me how to implement the eventClick, eventResize after the calendar is rendered?

I use this in index.php $events,?>
and the events show in the calendar properly. But the calendar events will not show on calendar when I add the following JS code from the link http://fullcalendar.io/docs/mouse/eventClick/:

$('#calendar').fullCalendar({
eventClick: function(calEvent, jsEvent, view) {

    alert('Event: ' + calEvent.title);
    alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY);
    alert('View: ' + view.name);

    // change the border color just for fun
    $(this).css('border-color', 'red');

}

});

The file or directory to be published does not exist

just installed the fullcalender widget and run into an error which is the fullcalender files are installed in bower-asset folder and the widget is looking at bower folder. after manual copy the files from bower-asset folder to bower folder, the widget works fine.

Views and default view through parameters

Hi @philippfrenzel, I'm confused with using parameters to display calendars.
I am planning many specific calendars, so I should not hardcode the plugin's parameters.
But it seems that some passed parameters are ignored. I am probably missing something.
Here is my example:

<?php 
$events = array();
$Event = new \yii2fullcalendar\models\Event();
$Event->id = 1;
$Event->allDay = false;
$Event->start = date('Y-m-d\Th:m\Z');
$Event->end = date('Y-m-d\Th:m\Z', strtotime("+90 minutes"));
$Event->title = 'Event1 ';
$events[] = $Event;

$Event = new \yii2fullcalendar\models\Event();
$Event->id = 2;
$Event->allDay = false;
$Event->start = date('Y-m-d\Th:m\Z', strtotime("+90 minutes"));
$Event->end = date('Y-m-d\Th:m\Z', strtotime("+120 minutes"));
$Event->title = 'Event2';
$events[] = $Event;
?>
....
<?=yii2fullcalendar::widget([ 'events' => $events,
  'options' => [
    'id' => 'stream_1',
    'header' => [
      'left'=>'title',
      'center'=>'prev,next today',
      'right'=>'agendaWeek,basicDay'
     ],

     'lang' => 'en',
  ],

  'clientOptions' => [
    'default' => 'agendaWeek',
    'editable' => true,
    'selectHelper' => true,
  ],
]);
?>

Only the parameters 'id' and 'lang' are treated.
Other parameters:
'right' => 'agendaWeek, basicDay' is ignored and the calendar still displays 'month'
'default' => 'agendaWeek'also ignored and 'month' is displayed by default.

My question is how to hide the month view and get 'basicDay' or 'agendaWeek' as default view?
I also wonder how to display the end time of the event, but it may be another matter.

Many thanks for any tips or hints.

update to fullcalendar 2.5

Fullcalendar 2.5 is released.
Why don't you change the line in composer.json

"bower-asset/fullcalendar" : "2.3.* | 2.2.* | 2.1.*"

to

"bower-asset/fullcalendar" : "2.*"

or even

"bower-asset/fullcalendar" : "*"

?

composer does not install fullcalendar

I followed your installation guide, but I have the following error:
The file or directory to be published does not exist: C:\xampp\htdocs...\vendor\bower/fullcalendar/dist

According to your issue here: fxpio/composer-asset-plugin#91
I deleted the complete vendor folder an did a composer install with the same result.

Click event error

fullcalendar.js:9276 Uncaught TypeError: options[name].apply is not a function. Cant see to avoid this error. Here is the code

\yii2fullcalendar\yii2fullcalendar::widget(array(
'options' => [
'lang' => 'en-GB',
//... more options to be defined here!
],
'clientOptions' => [
'eventClick' => "eventClick: function(calEvent, jsEvent, view) {
window.location = 'http://www.domain.com?start=' + calEvent.start;

}"],
'events' => $events,

));

dependence from YiiAsset

Hi.
fullcalendar.js is may connected before jquery.js by default.
Can you add dependences to CoreAsset.php like:
public $depends = [
'yii\web\YiiAsset',
'yii2fullcalendar\MomentAsset',
'yii2fullcalendar\PrintAsset'
];
?

Not showing Am/Pm

hi,

i used this code

$events = array();
  //Testing
  $Event = new \yii2fullcalendar\models\Event();
  $Event->id = 1;
  $Event->title = 'Testing';
  $Event->start = date('Y-m-d\TH:i:s\Z');
  $events[] = $Event;

  $Event = new \yii2fullcalendar\models\Event();
  $Event->id = 2;
  $Event->title = 'Testing';
  $Event->start = date('Y-m-d\TH:i:s\Z',strtotime('tomorrow 2pm'));
  $events[] = $Event;

  ?>

  <?= \yii2fullcalendar\yii2fullcalendar::widget(array(
      'events'=> $events,
  ));?>```

i got a calendar with 11.47a testing and 2 p testing. I want am and pm not a and p. How can i do it?
I tried like this   $Event->start = date('Y-m-d\TH:i:s:a\Z');  $Event->start = date('Y-m-d\TH:i:a\Z'); 
nothing worked. 

Event not rendering from Ajax

Hey Philip, I've been using this extension for my project, I can create the event on the weekview design, But i can't able to retrieve the stored events from the database.
Here is the sample ajax returned value.
Can give a suggestion on this

11

Google Calendar

Hello,

I would like to ask if it's possible to use google calendar with this extension,
My code is:

'calendar', 'events' => $events, 'googleCalendar' => true, 'googleCalendarApiKey' => 'xxxxxxx', 'clientOptions' => [ 'editable' => false, 'weekends' => true, // 'eventLimitClick' => 'popover', 'theme' => true, 'dayClick' => new JsExpression($JSEventDayClick), 'eventClick' => new JsExpression($JSEventClick) ], )); ?>

But this does not work. But I see the googleCalendar in the class reference.

ReflectionException Class yii\jui\JuiAsset does not exist

ReflectionException
Class yii\jui\JuiAsset does not exist
solution i found ->
In file [VandorDir]/philippfrenzel\yii2fullcalendar\CoreAsset.php change public $depends = ['yii\jui\JuiAsset']; in to public $depends = ['yii\web\YiiAsset']; ...will work fine

Add resource "resourceId" in the model

Dear Philipp

Thanks for the great work you have done. It could maybe be a good idea to add "resourceId" as an attribute to the event model: that way it can also be used for the scheduler functionality of the fullcalendar plugin.

Kind regards

Jens Buysse

1 day is coming less in span

i m selecting start_date 2015-11-15 and end_date 2015-11-17.
but in calendar it is showing only 15 and 16 event span.
17 is not coming.

editable not working

I put the editable option equals to true on clientOptions, but it's not working. The events are simply not editable.

[ 'defaultView'=> 'agendaWeek', 'lang'=>'pt-br', 'minTime'=> '06:00:00', //colocar como opcao 'maxTime'=> '23:00:00', //colocar como opcao 'allDaySlot'=> false, 'editable' => true, 'droppable' => true, ], 'header'=> [ 'left'=> 'prev,next today', 'center'=> 'title', 'right' => 'agendaWeek,agendaDay' ], 'events'=>$events ]); ?>

Calendar duplicates with Pjax + browser back button

Hello,

I'm using your awesome fullcalendar widget in a view using Pjax, and I was having an issue where clicking the browser back button to go back to the view with the calendar would end up triggering the widget JS again and rendering the calendar twice.

I tried several ways to address the issue, and there probably are multiple ways to fix it, but in the end, what I was able to get working was I adjusted the registerPlugin method to first check if the calendar already exists before registering the javascript.

So in the registerPlugin() method, I made the following change:

//$js[] = "jQuery('#$id').fullCalendar($cleanOptions);";
$js[] = "if (jQuery('#$id').children().not('.fc-loading').length == 0) { jQuery('#$id').fullCalendar($cleanOptions); }";

This seems like a safe and helpful approach, so I thought I would share it in hopes it gets added to the core, or at least helps anyone else out that may be experiencing the same issue.

If there is a different and better way to do this, please let me know.

Customize Ajaxevent of yii2fullcalendar extension in Yii2

I'm using https://github.com/philippfrenzel/yii2fullcalendar extension for my app. I have many calendars identified by Id. I want to load events base on an ID with Ajax. I want to use a radio form to select which calendar should be shown.

The view: index.php
`

[ ``` 'allDaySlot' => false, 'selectHelper' => true, 'eventClick' => new JsExpression($JSEventClick), 'dayClick' => new JsExpression($JSDayClick), 'defaultView' => 'agendaWeek', 'header' => [ 'center'=>'prev,next today', 'left'=>'', 'right'=>'agendaDay,agendaWeek,month', ], ], 'ajaxEvents' => Url::to(['/datsan/jsoncalendar', 'id' => XXX ]) ``` )); ?>`

DatsanController.php`

public function actionJsoncalendar($id,$start=NULL,$end=NULL,$_=NULL)

{

\Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;

$events = Datsan::find()->where([

    'daXoa' => False,

    'id_sanCon' => $id,

    ])->all();

$tasks = [];

foreach($events as $eve)

{

    $event = new \yii2fullcalendar\models\Event();

    $event->id = $eve->id;

    $event->title = $eve->tieuDe;

    $event->start = $eve->ngayBatDau.' '.$eve->gioBatDau;

    $event->end = $eve->ngayKetThuc.' '.$eve->gioKetThuc;

    $tasks[] = $event;

}

return $tasks;

}
`
I do not know how to use the Radio form to change XXX value then ajax the event database from sever.

event render callback

I am not sure if this is feasible in the current version. Would it be possible to let an user of the class specify its own eventRender callback function?

jquery-ui is included regardless of whether theming is enabled...

... and it defaces my page.
Here is a minimum view I use to show the problem:

<?php
use yii\helpers\Html;

echo Html::beginTag('div', ['class' => 'page-header']);
echo Html::beginTag('h1');
echo \yii\bootstrap\ButtonDropdown::widget([
    'label' =>'<span class="glyphicon glyphicon-menu-hamburger" aria-hidden="true"></span>',
    'encodeLabel' => false,
    'options' => [ 'class' => 'btn-default' ],
    'dropdown' => [
        'items' => [
            ['label' => 'DropdownA', 'url' => '/'],
            ['label' => 'DropdownB', 'url' => '#'],
        ]
    ]
]);
echo ' Test';
echo Html::endTag('h1');
echo Html::endTag('div');

echo \yii2fullcalendar\yii2fullcalendar::widget([]);

The button dropdown looks gigantic on the view, because jquery-ui adds its own classes to it (ui-widget and whatnot). If I comment out the dependency in CoreAsset.php, then everything works.

I suggest registering jquery ui only when fullcalendar theming option is enabled.

Day-clicks in calendar do not work if too much page content exists above calendar

yii2fullcalendar (v2.1.1 fully up to date through composer) does not register clicks on individual days if the yii2fullcalendar widget is not near the top of the page. The amount of content that can be put above the calendar before it stops working differs on a desktop and a mobile device, perhaps related to the height of the screen?

Testcase: insert the yii2fullcalendar widget on a page below a dummy div with a fixed height as follows, and adjusting the height of browser window to find out when clicks stop working:

<div style="height:300px;"></div> <!-- test on mobile -->
<div style="height:1200px;"></div> <!-- test on desktop -->
<?php echo \yii2fullcalendar\yii2fullcalendar::widget(array(
      'id' => 'calendar',
      'options' => [
        'lang' => 'en-gb',
      ],
      'clientOptions' => [
        'selectable' => true,
        'dayClick' => new JSExpression("function(date, jsEvent, view, resource) {
            console.log( 'I clicked on a day' );
        }"),
      ],
 )); ?>

i cant change color of event,

this is answer, i found thnku.

  <?= \yii2fullcalendar\yii2fullcalendar::widget(array(
      'events'=> $event,
      'clientOptions'=>[
      'weekends'=>true,
      'hiddenDays'=>[0],
      ],
    ));?>

Wrong time

image

I don't know why the minute of start and end time on tooltip are different from calendar's time.
On the tooltip, the minute is always "05". Please help me to get correct value of minute (1:00 - 2:30).

This is code of fullcalendar widget:

<?= \yii2fullcalendar\yii2fullcalendar::widget(array(
            'options' => [
            ],
            'clientOptions' => [
                'allDaySlot' => false,
                'selectHelper' => true,
                'eventClick' => new JsExpression($JSEventClick),
                'dayClick' => new JsExpression($JSDayClick),
                'eventMouseover' =>new JsExpression($JSDayMouseover),
                'eventMouseout' =>new JsExpression($JSDayMouseout),
                'defaultView' => 'agendaWeek',
                'header' => [
                    'center'=>'prev,next today',
    //                'left'=>'title',
                    'left'=>'',
                    'right'=>'agendaDay,agendaWeek,month',
                ],
            ],
            //'events'=> $events,   // Dung khi goi action index
           'ajaxEvents' => Url::to(['/datsan/jsoncalendar', 'id_sanCon' => $modelSanCon->id])
        ));
        ?>

This is code for tooltip:

$JSDayMouseover = <<<EOF
    function(calEvent, jsEvent, view) {
       var tooltip = '<div class="fullcalendar-tooltipevent">'
                        + '<h3>'+calEvent.title+'</h3>'
                        + '<p>'
                        + calEvent.start.format("DD/MM/Y") + ': ' + calEvent.start.format("HH:MM") + ' - ' + calEvent.end.format("HH:MM")
                        + '</p>'
                        + '</div>';
        $("body").append(tooltip);
        $(this).mouseover(function(e) {
            $(this).css('z-index', 10000);
            $('.fullcalendar-tooltipevent').fadeIn('500');
            $('.fullcalendar-tooltipevent').fadeTo('10', 1.9);
        }).mousemove(function(e) {
            $('.fullcalendar-tooltipevent').css('top', e.pageY + 10);
            $('.fullcalendar-tooltipevent').css('left', e.pageX + 20);
    });
    }
EOF;

Cannot edit

Hello.

I cannot edit the events which was created during runtime.

I've modified the yii2fullcalendar.php :
public $clientOptions = [
'weekends' => true,
'default' => 'month',
'editable' => true,
];

When i create the events:

        $Event = new \yii2fullcalendar\models\Event();
        $Event->id = $record->id;
        $Event->title = User::find()->where('id='.$record->user)->one()->username;
        $Event->editable = true;
        $Event->start = date($record->date);
        $Event->className = 'Ilness';
        $events[] = $Event;

The view:

$model->getVacationDays(), 'options' => [ 'id' => 'calendar', ], 'clientOptions' => [ 'selectable' => true, 'selectHelper' => true, 'droppable' => true, 'editable' => true, 'drop' => new JsExpression("function(date) { alert('Dropped on ' + date.format()); if ($('#drop-remove').is(':checked')) { // if so, remove the element from the 'Draggable Events' list $(this).remove(); } }"), 'select' => new JsExpression("function(start, end) { $('#newEventModal').find('#startDate').val(start.format('YYYY-MM-DD')); $('#newEventModal').find('#endDate').val(end.format('YYYY-MM-DD')); $('#newEventModal').find('#user').val('".Yii::$app->user->username ."'); ``` $('#newEventModal').modal('show'); }"), 'eventClick' => new JsExpression("function(calEvent, jsEvent, view) { //alert('Event: ' + calEvent.title); //alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY); //alert('View: ' + view.name); // change the border color just for fun $(this).css('border-color', 'red'); }"), 'defaultDate' => date('Y-m-d') ], ));?>

But still i cant drag and drop that event

eventClick not working

Hi I'm using yii2fullcalendar extension. It works fine, at least it renders the calendar and the events I set from my controller, but I can make the eventClick or drag to work. Not sure what's wrong.

Print agendaWeek not working

When i try to print the calendar in agendaWeek mode, no events are display.

[ 'lang' => 'fr', 'defaultView' => 'agendaWeek', 'weekNumbers' => true, 'defaultDate' => date('Y-m-d'), 'eventTimeFormat' => 'H:mm', 'scrollTime' => '08:00:00', 'aspectRatio' => 1.6, 'allDaySlot' => false, 'eventLimit' => 3, ], 'options' => [ 'id' => 'myCalendar', ], 'header' => [ 'center'=>'title', 'left'=>'prev,next today', 'right'=>'agendaDay,agendaWeek,month' ], 'eventRender' => 'function(event, element) { element.find(\'.fc-title\').append("

" + event.description + ""); } ', 'ajaxEvents' => yii\helpers\Url::to(['/jsoncalendar']) ]); ?>

PS: in month view, all is working well.

Event menager

Hi @philippfrenzel I have 1 more question.

Do you use eny component to event menager to sher event on callender?
I would write any controller but, i look you use Timetable, is any component to yii?

Agenda not working/how to setup

Hello,
I'm trying to add agenda in widget options, but I tried many different combinations and I have still problem to do it.

I tried something like:

<?= \yii2fullcalendar\yii2fullcalendar::widget(array(
        'options' => [
            'eventLimit' => true,
            'views' => [
                'agenda' => [
                    'eventLimit' => 3,
                ],
            ],
        ],
        'events'=> $events,
      )); ?>

hiddenDays doesn't work

Hello!
Thank you for this plugin.
I have some questions to you:
1) Can you please provide "hiddenDays" option in your fullcalendar? Because only "weekends" works;
2) How can i enable "eventClick" in yii2, because i don't know a normal way to open "view" in CRUD without it?
Thank you!

How to use dayclick for instant save

Hello,

I'm trying to use fullcalendar to save instantly on dayclick an event whose data come from dropdown list before.

So, I need to take data from dropdown list, to save data on click and to display all data saved.

For this, I'm trying first to save an event on dayclick "normally" with a prompt for the title of the event.

But it doesn't work : the prompt come (alert too) but nothing is saved on my calendar.

I have already searched on the doc (https://fullcalendar.io/docs/mouse/dayClick/) and on th demo (https://github.com/philippfrenzel/yii2fullcalendar-demo/blob/master/views/site/index.php) dut I don't find something that works.

I thing I don't understand something but I don't know what...

That's my view (index.php) :


<?php
    use yii\helpers\Html;
    use yii\helpers\Url;
    use yii\helpers\ArrayHelper;
    use yii\helpers\Json;
    use app\models\FeuilleDeJourResponsable;
    use yii\web\JsExpression;
?>
<div class="site-index">
    <?php
    $JSDayClick = <<<EOF
    function(start,end) {
        var title = prompt('Event Title:');
        var eventData;
        if (title) {
            eventData = {
                title: title,
                start: start,
                end: end
            };
            $('#w0').fullCalendar('renderEvent', eventData, true);
        }
        $('#w0').fullCalendar('unselect');
    }
EOF;
?>
    <?= yii2fullcalendar\yii2fullcalendar::widget([
        'id' => 'calendar',
        'clientOptions' => [
           // 'language' => 'fa',
            //'eventLimit' => TRUE,
            'selectable' => true,
            'selectHelper' => true,
            'droppable' => true,
            'editable' => true,
//          'theme'=>true,
            'fixedWeekCount' => false,
            'defaultDate' => date('Y-m-d'),
            'dayClick'=>new \yii\web\JsExpression($JSDayClick)
        ],
        'ajaxEvents' => Url::to(['/site/jsoncalendar']),              
    ]);
?>
    <?= Html::encode($JSDayClick); ?>  
</div> 

And for my controller (SiteController.php) I try all I can find like this (http://www.yiiframework.com/extension/yii2fullcalendar/) and this (https://github.com/philippfrenzel/yii2fullcalendar-demo/blob/master/controllers/SiteController.php)

Someone can help me ?

Thank you,
Sarah

installation

Hi, how do i install this extension (Yii2) , or which folder should i put in ?

Thanks

Depending on your CoreAsset

Dear Philipp
I'm trying to add my javascipt file to manipulate the calendar in de browser. I have created an Asset which should depend on your Asset (CoreAsset I presume). Only when I add the dependancy I receive the error:

Unknown Class – yii\base\UnknownClassException
Unable to find 'app\vendor\philippfrenzel\yii2fullcalendar\CoreAsset' in file: H:\Equality\horizonmanagerv2/vendor/philippfrenzel/yii2fullcalendar/CoreAsset.php. Namespace missing?

My AssetBundle is as follows:
`<?php
/**

namespace app\assets;

use yii\web\AssetBundle;

/**

  • @author Jens Buysse [email protected]

  • @SInCE 2.0
    */
    class PrijszettingAsset extends AssetBundle
    {
    public $basePath = '@webroot';
    public $baseUrl = '@web';
    public $css = [

    ];
    public $js = [
    'js/prijszetting.js'
    ];
    public $depends = [
    'yii\web\YiiAsset',
    'app\vendor\philippfrenzel\yii2fullcalendar\CoreAsset'

    ];
    }`

getting 404 for en-us.js in lang directory

I'm not sure if this issue is that the file is actually missing from fullcalendar or if it is looking for it unnecessarily since en-us.js is the default language. Could you look into this?

Invalid Parameter – yii\base\InvalidParamException

Hi I have a problem with component when I try load a widget i heve errors:
The file or directory to be published does not exist: /volume1/web/Migo/advanced/app/vendor/bower/fullcalendar/dist

  1. in /volume1/web/Migo/advanced/app/vendor/yiisoft/yii2/web/AssetManager.php at line 385
    line 385: throw new InvalidParamException("The file or directory to be published does not exist: $path");

I try install this component in Phundament 4.

Unknown Property eventLimit

Unknown Property – yii\base\UnknownPropertyException

Setting unknown property: yii2fullcalendar\yii2fullcalendar::eventLimit

Please help me to add this property.

print calendar

it would be nice to have the ability to disable the printAsset. I mean, print the calendar as it is.

EventClick Yii2 modal plugin documentation

Is there any documentation to implement clicking and hovering of events like...

$activities, 'eventClick' => 'function(calEvent, jsEvent, view) { //insert yii2 modal plugin for displaying the information regarding the events ``` }' ]); ``` ?>

Directory vendor/bower/fullcalendar is empty

Hi,

I just updated my application via composer and I have also seen that you changed the way fullcalendar and moment.js are included. The directories vendor/bower/fullcalendar and vendor/bower/moment were successfully created. The moment directory looks good but the fullcalendar directory is empty. Any idea why?

This is the content of my composer.json:

{
    "name": "yiisoft/yii2-app-basic",
    "description": "Yii 2 Basic Application Template",
    "keywords": ["yii2", "framework", "basic", "application template"],
    "homepage": "http://www.yiiframework.com/",
    "type": "project",
    "license": "BSD-3-Clause",
    "support": {
        "issues": "https://github.com/yiisoft/yii2/issues?state=open",
        "forum": "http://www.yiiframework.com/forum/",
        "wiki": "http://www.yiiframework.com/wiki/",
        "irc": "irc://irc.freenode.net/yii",
        "source": "https://github.com/yiisoft/yii2"
    },
    "minimum-stability": "dev",
    "require": {
        "php": ">=5.4.0",
        "yiisoft/yii2": "*",
        "yiisoft/yii2-bootstrap": "*",
        "yiisoft/yii2-swiftmailer": "*",
        "kartik-v/yii2-widgets": "*",
        "kartik-v/yii2-grid": "*",
        "kartik-v/yii2-detail-view": "*",
        "kartik-v/yii2-mpdf": "@dev",
        "kartik-v/yii2-money": "*",
        "webvimark/module-user-management": "*",
        "webvimark/bootstrap-switch": "*",
        "2amigos/yii2-tinymce-widget" : "*",
        "creocoder/yii2-nested-sets": "dev-master",
        "philippfrenzel/yii2fullcalendar": "*",
        "dmstr/yii2-adminlte-asset": "*"
    },
    "require-dev": {
        "yiisoft/yii2-codeception": "*",
        "yiisoft/yii2-debug": "*",
        "yiisoft/yii2-gii": "*",
        "yiisoft/yii2-faker": "*"
    },
    "config": {
        "process-timeout": 1800
    },
    "scripts": {
        "post-create-project-cmd": [
            "yii\\composer\\Installer::postCreateProject"
        ]
    },
    "extra": {
        "yii\\composer\\Installer::postCreateProject": {
            "setPermission": [
                {
                    "runtime": "0777",
                    "web/assets": "0777",
                    "yii": "0755"
                }
            ],
            "generateCookieValidationKey": [
                "config/web.php"
            ]
        },
        "asset-installer-paths": {
            "npm-asset-library": "vendor/npm",
            "bower-asset-library": "vendor/bower"
        }
    }
}

Syntax Error on Firebug

I added phillippfrenzel/yii2fullcalendar via composer, and then added the following to my view page:

$events, )); ?>

I am trying to add a click event to add new events within the calendar, however I am getting an error hen I add the above line of code and I can't get the click event to work. The calendar loads with my events, but shows the following error on firebug : SyntaxError: expected expression, got '<'

javascript error using onClick callback

Hi,
thank you for making this plugin.
The calendar give me an error when trying to use the onclick event on the events in this way:

<?= \yii2fullcalendar\yii2fullcalendar::widget(array( 'events'=> $events, 'clientOptions' => [ 'lang' => 'it', 'defaultView' => 'agendaWeek', 'minTime' => "08:00:00", 'maxTime' => "24:00:00", 'eventClick' => 'function(){alert(1);}', ] ));

Instead of alert(1) message I get this javascript error:
fullcalendar.js:9873 Uncaught TypeError: options[name].apply is not a function

Thank You

Alessandro

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.