Giter Club home page Giter Club logo

Comments (10)

CedricBongaerts avatar CedricBongaerts commented on August 11, 2024

I've held this aside for a bit to work on other stuff in my project but it's time for me to configure the calendar. At the moment, the calendar show the sample view posted on the ReadMe. But if I wish to use the calendar on fullcalendar.io, do I need to implement the jquery?
I dont seem to have the buttons through the header even though when I browse to the Calendar.php it contains the code:

protected $defaultOptions = [
'header' => [
'left' => 'prev,next today',
'center' => 'title',
'right' => 'month,agendaWeek,agendaDay',
],
'eventLimit' => true,
];

Is there a reason why it's not showing the buttons in the header?

Also, for some reason it only shows the first Event that I make in the database.
Sorry for the many questions but I've been googling this and haven't found any answers.

Thanks,
Ced

from laravel-fullcalendar.

maddhatter avatar maddhatter commented on August 11, 2024

Make sure your print css file has the media="print" attribute:

<link rel="stylesheet" media="print" href="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.2.7/fullcalendar.print.css"/>

Looks like tha'ts missing from the sample view in the documentation, I'll update that

from laravel-fullcalendar.

Conquerer avatar Conquerer commented on August 11, 2024

$events = [];
$data = Event::all();
if($data->count()) {
foreach ($data as $key => $value) {
$events[] = Calendar::event(
$value->place,
true,
new \DateTime($value->start_date),
new \DateTime($value->end_date.' +1 day'),
null,
// Add color and link on event
[
'color' => '#f05050',
'url' => 'pass here url and any route',
]
);
}
}
$calendar = Calendar::addEvents($events);
return view('admin.calender', compact('calendar'));

This is my function in the controller and I dis use Calendar in the controller set its aliases and providers as well but the calendar is not visible
please help me

from laravel-fullcalendar.

AliVeseli avatar AliVeseli commented on August 11, 2024
    $db_events = Event::get();
    $events = [];
    foreach ($db_events as $event) {
        $events[] = \Calendar::event(
            $event->place,
            true,
            new \DateTime($value->start_date),
            new \DateTime($value->end_date.' +1 day'),
            0,
            [
                'color' => '#f05050',
                'url' => 'pass here url and any route',
            ]
        );
    }
    
    $calendar = \Calendar::addEvents($events);
    return view('admin.calender', compact('calendar'));

from laravel-fullcalendar.

AliVeseli avatar AliVeseli commented on August 11, 2024

If Calendar does not appear at all check the View check the script ordering

it should be

{!! $calendar->calendar() !!} <script src="{{ asset('vendor/jquery/jquery-3.2.1.min.js') }}"></script> <script src="{{ asset('js/moment.js') }}"></script> <script src="{{ asset('vendor/fullcalendar/fullcalendar.min.js') }}"></script> {!! $calendar->script() !!}

from laravel-fullcalendar.

Conquerer avatar Conquerer commented on August 11, 2024

Thanks AliVeseli...,For your kind help but,the same issue repeats again..I can't able to visualize where is the error.I had added all the css and js files required but...
view page

my_controller
my_view_page

from laravel-fullcalendar.

AliVeseli avatar AliVeseli commented on August 11, 2024

You have jquerry inserted twice remove it one .

from laravel-fullcalendar.

AliVeseli avatar AliVeseli commented on August 11, 2024

Remove version 1.11.2 keep the 2.1.3

from laravel-fullcalendar.

Conquerer avatar Conquerer commented on August 11, 2024

Updated as said but same issue i.e blank ,Admin or anyone, AliVeseli can you help me to know the error so that I can rectify it..

from laravel-fullcalendar.

essineden avatar essineden commented on August 11, 2024

Seems like I'm having the same issue - i think.

I've followed the youtube video and the instructions from the website but I'm getting

Undefined variable: calendar_details (View: C:\xampp\htdocs...\resources\views\pages\event.blade.php)

Am I missing something from the instructions? The Add Event is working but after adding

{!! $calendar_details->calendar() !!}

The application doesn't seem to work anymore.

TIA

from laravel-fullcalendar.

Related Issues (20)

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.