Coder Social home page Coder Social logo

fullcalendar-rails's People

Contributors

1mill avatar albanpeignier avatar antododo avatar benjam1n avatar bokmann avatar brendon avatar brianejsmont avatar davidwessman avatar drwl avatar dyatlov avatar elmoaaron avatar eraleis avatar fearenales avatar gr8bit avatar greshny avatar jackii avatar roippi avatar samrayner avatar sanbiv avatar ytrrty 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  avatar  avatar

fullcalendar-rails's Issues

Sqlite vs Postgres

I have your sample app with Sqlite working on my iMac. When I get the code into my own app, the calendar displays fine except I don't see any events.

Questions:

  1. Should Postgres work just the same as Sqlite or do I need to make some adjustment?
  2. Is it ok to have a few extra fields in the Events table as long as I have all the fields your using?

Thanks,
Dave

Version 2.2.5 error

First of all, I can't tell you how grateful I am to have this gem!

On to the issue. In the latest version I've discovered that events rendered a day prior to their actual start.

Don't include fullcalendar.print in CSS manifest

In README.md, it says to do the following:

At this point, the files from the fullcalendar project are in your asset pipeline's path... all you have to do is require them in the appropriate places. For instance, in your application.css.scss:

*= require fullcalendar
*= require fullcalendar.print

If you follow these instructions, you might have a difficult time changing the colors for events, because fullcalendar.print overrides the styles because it includes the following lines:

.fc-event {
    background: #fff !important;
    color: #000 !important;
}

I think the README.md should instruct users to only include *= require fullcalendar in the application.css.scss, and then in their layout file, do the following:

<%= stylesheet_link_tag "fullcalendar.print", :media => "print" %>

Google calendar events not fetched when using Google apps account.

when i integrate/share a calendar from the google apps account the events are not fetched and all the events onto the calendar disappear. where as Events are properly fetched and displayed from the normal gmail account.

Is there any way to integrate calendar from the google apps account using the xml link?

Including even sources from nested resource

i have events nested within services. How do I include this as an eventSource, the url is like so /services/:service_id/events , so far I can only get it to work if I use this as the url (/services/1/events) which requires me to include the service ID manually.

Push updates to rubygems?

I noticed the rubygems version of the gem is dated. Any plans to push stable releases through that channel?

Different calendars for different places not working

I recently opened a similar issue and got help from @davidwessman.
See my question at stackoverflow.

My application is in Rails 5.0.0.1, therefore I have to use form_tag in place of the form_with suggested by @davidwessman in his answer and in his gist.

Considering the scope suggested: scope(:place, (search), -> { where('place LIKE ?', "%#{search}%") }), I had to add a comma after (search), otherwise Atom's Linter would raise an error. Also I could not use it in the event model, because I receive the following error:

undefined local variable or method `search' for #<Class:0x007f6979f9c128>

Therefore, I changed the scope with the method below:

def self.place(search)
  where("place ILIKE ?", "#{search}")
end

I made two attempts, one defining @events in the index action of the events controller, the other in a custom feed action as suggested by @davidwessman, however they both fail: fullcalendar does not show up.

I created two gists with my two attempts in case someone of you want to check my code: gist1 and gist2.

My server log is below:

Started GET "/events?utf8=%E2%9C%93&place=london&commit=Search" for 127.0.0.1 at 2017-08-13 16:28:10 +0200
Processing by EventsController#index as JS
  Parameters: {"utf8"=>"โœ“", "place"=>"london", "commit"=>"Search"}
  User Load (0.2ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2  [["id", 1], ["LIMIT", 1]]
  Rendering events/index.html.erb within layouts/application
  Rendered events/index.html.erb within layouts/application (1.0ms)
  Rendered layouts/_shim.html.erb (0.3ms)
  Rendered layouts/_header.html.erb (2.1ms)
  Rendered layouts/_footer.html.erb (0.3ms)
Completed 200 OK in 88ms (Views: 83.8ms | ActiveRecord: 0.2ms)

NOTE: one strange thing is that when I go to the event index page the input is pre-filled with the following content: {:id=>"place-field", :placeholder=>"Search events"}

Upgrade to use the latest version

Hi there, it looks like this gem is a bit behind as far as fullcalendar goes. Would you be interested in releasing a version with the latest version of fullcalendar?

I cant make to show the fullCalendar

I have a ruby on rails app, that i tryed to implement the FullCalendar, but when i open the view is showing nothing.
My Gemfile :

ruby "2.4.4"

gem 'rails', '~> 5.1.4'

gem 'puma', '~> 3.7'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'

# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

gem 'coffee-rails', '~> 4.2'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'

# Custom Gems
gem 'country_select'
gem 'will_paginate', '~> 3.1.0'
gem 'devise', '4.4.1'
gem 'dotenv-rails', groups: [:development, :test]
gem 'fullcalendar-rails'
gem 'momentjs-rails'

# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
  gem 'capybara', '~> 2.13'
  gem 'selenium-webdriver'
  gem 'sqlite3'
end

group :development do
  gem 'web-console', '>= 3.3.0'
  gem 'listen', '>= 3.0.5', '< 3.2'
  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'
end

group :production do
  gem 'pg', '0.21.0'
end

This is my application.js

//= require turbolinks
//= require_tree .
//= require moment 
//= require fullcalendar

function eventCalendar() {
  return $('#event_calendar').fullCalendar({events: [
        {
            title  : 'event1',
            start  : '2010-01-01'
        },
        {
            title  : 'event2',
            start  : '2010-01-05',
            end    : '2010-01-07'
        },
        {
            title  : 'event3',
            start  : '2010-01-09T12:30:00',
            allDay : false // will make the time show
        }
    ]});
};
function clearCalendar() {
  $('#event_calendar').fullCalendar('delete'); // In case delete doesn't work.
  $('#event_calendar').html('');
};
$(document).on('turbolinks:load', eventCalendar);
$(document).on('turbolinks:before-cache', clearCalendar)`

My application.css

 *= require_self
 *= require fullcalendar
 */

My view
<div id="calendar"></div>
If it helps this is my git hub https://github.com/Oredna/Prawo

I dont know what to do, i have tryed everything, and i dont know what to do anymore.

Fullcalendar JS initialization

Currently you're linking to http://blog.crowdint.com/2014/02/18/fancy-calendars-for-your-web-application-with-fullcalendar.html as a reference. Following instructions I wasn't able to get a working sample. The link mentions the following....

$('#calendar').fullCalendar(
    events: '/events.json'
);

This does not work for me. Instead, I wrapped the events parameter in an object like this...

$('#calendar').fullCalendar({
    events: '/events.json'
});

The 2nd example worked. The former threw an error. Am I missing something or are things maybe not up to date?

Upgrade Fullcallendar to 2.3.0

Thank you for maintaining this gem, I love when I can just include a gem rather than commit a JS file in the version control.

There has been an important bugfix which we need in our application. So it would be great to see this updated to the latest version :)

Include top level directory

Hello

It would like to suggest including a top level directory for the javascript files. At the moment one has to import "lang-all.js" and "gcal.js". Those names seem more common than "fullcallendar" and could lead to conflicts. Somethig like //= require fullcallendar/lang-all seems better than //= require lang-all.

Missing some information on how to properly integrate the assets with a Rails application

Hi,

I find this gem very useful, however, I was missing some information on how to properly integrate the assets with a Rails application. So I fiddled around a little bit (actually I had to look up the names of the assets here on GitHub). To integrate the assets (Javascript and CSS files), I added them to my application.css.scss and application.js file

Here's the excerpt from my application.css.scss:

*= require fullcalendar
*= require fullcalendar.print

An here's the excerpt from my application.js

//= require fullcalendar
//= require gcal

For the Javascripts, it should also be pointed out in which order the files should be included / loaded.

It would be great if you could provide further description on the above (probably also with some alternatives).

Cheers

Testing helpers

Worked a bit with some testing of my modules which implements Fullcalendar and I thought it would be nice to add some testhelpers to the gem.
Would you like this? Or do you just want to put the JS in the pipeline?

Cheers, David

Undefined errors since update

I've updated fullcalendar-rails and generated an API key then turned on Calendar API.

I've added my API key to my code and now I'm getting this error:

$(document).ready(function() {
        $('#calendar').fullCalendar({
                googleCalendarApiKey: '<secret>',
                header: {
                    left: 'prev,next today',
                    center: 'title',
                    right: 'month,agendaDay',
                    timezone: 'Europe/London',
                },
                timeFormat: '',
        events: '<secret>@import.calendar.google.com',      
                timezone: 'Europe/London',
                loading: function(bool) {
                    $('#loading').toggle(bool);
                },
                eventClick: function(event) {
            if (event.url) {
                return false;
            }
            },
        });
    });

I'm getting these errors:

Uncaught ReferenceError: moment is not defined fullcalendar.js?body=1:13
Uncaught TypeError: Cannot read property 'applyAll' of undefined gcal.js?body=1:20
Uncaught TypeError: Cannot read property 'applyAll' of undefined gcal.js?body=1:20

fullcalendar.js
http://pastebin.com/zi6egy3H

gcal.js
http://pastebin.com/KNVY0tFW

Dragging the event does not update the db

Hello,
i tried last version of your gem: 2.1.1 It has some layout problem with activeadmin so i'm using the 2.0.2 Anyway both fails to update the db when I drag events.

  • I get message $.update is not a function so i used the ajax method, i solved but i'm reporting because it is a weird issue:
$.ajax
    url: "/admin/events/" + the_event.id,
    type: "PUT",
    dataType: "json",
    data:
      event:
        title: the_event.title,
        starts_at: "" + the_event.start,
        ends_at: "" + the_event.end,
        description: the_event.description
  • Start and end date are not dates. Both have a number instead of the event date. Any idea?
Started PUT "/admin/events/2" for 127.0.0.1 at 2014-10-30 12:14:55 +0100
  Processing by Admin::EventsController#update as JSON
    Parameters: {"event"=>{"title"=>"Caricamento", "starts_at"=>"1412208000000", "ends_at"=>"1412208000000", "description"=>"Selezionare per caricamento"}, "id"=>"2"}

(3.0ms)  EXEC sp_executesql N'UPDATE [events] SET [starts_at] = NULL, [ends_at] = NULL, [updated_at] = ''2014-10-30T11:14:55.964'' WHERE [events].[id] = 2; SELECT @@ROWCOUNT AS AffectedRows'

installed gem, not working

I'm new to rails so maybe I'm doing something wrong but I added the gem to the gemfile, ran bundle, it installed with no errors but I don't see any additions to the manifests or new .js files in my app. I tried adding a jquery reference just to check but no luck. What am I doing wrong? I'm using Rails 3.1.1

Does fullcalendar have an option for scheduler?

I'm trying to figure out what the difference between the normal fullcalendar and its scheduler premium add-ons as I'll need it in a new rails application I'm working on. Does this gem provide the option of scheduler or is that something I would need to manually deal with? Any help is much appreciated!

doesn't work in procution enviroment by heroku(rails)

doesn't work because of 'http' protocol .

<script src='http//fullcalendar.io/js/fullcalendar-2.1.1/lib/moment.min.js'></script> <script src='http//fullcalendar.io/js/fullcalendar-2.1.1/lib/jquery.min.js'></script> <script src="http//fullcalendar.io/js/fullcalendar-2.1.1/lib/jquery-ui.custom.min.js"></script> <script src='http//fullcalendar.io/js/fullcalendar-2.1.1/fullcalendar.min.js'></script>

Different calendars for different events places

I read the useful and well written tutorial by Fernando Perales, which is linked in the readme.md file.
Since I would like to use fullcalendar-rails for my application, and I am new with json, I would like to ask some questions.

My Event model has a place attribute, which is the place where the event is held.
My goal is to have different calendars for different places, because each place has its own events.
Would it work if, after defining a search method in the Event model, I defined the instance variable @events used by the index.json.builder file as @events = Event.search(params[:search]) ?

Is the index page of the RESTful Events resource the right place to define @events?
What events will I see if I go to: localhost:3000/events.json or to: localhost:3000/events?

Since the show action of the RESTful Events resource corresponds to the url /events/1 for the event with id=1, I wonder if I will be routed correctly using for each event in the index.json.builder file the html format which generates a url such as /events/1.html. In fact, as common rails practice, I would insert the partial for the generic event in app/views/events/show.html.erb

Lastly: my users choose the day of the event with jQuery date picker, so the attribute event_date will be saved as a string with format "yy-mm-dd": how can I set json start and end? Are they necessary?

Refreshing page comes to present date

Calendar is showing current date after refreshing the page. For example if i am in month of September after refreshing the page it is showing current month august. I want to show same month events where i refresh the page.

fullCalendar + Turblolinks

The calendar is working fine within my Rails 4 application until the user click an event and then the back button from the web browser.

In this case, the calendar is duplicated on the page.

How to make it working so that the user doesn't see multiple times the calendar when using the back button?

I cannot get fullcalendar to display more than one event for a single day

I am using Google Calendar. I am new to using fullcalendar. I am a true novice using JavaScript.

I have days in my calendar where more than one event is listed. They appear correctly when I display the calendar in Google or use their embed code to display the data on a webpage. However when I try to use fullcalendar it will only show the first event for a single day.

Here is my JavaScript in application.js

$(document).ready(function() {
$('#calendar').fullCalendar({
height: 300,
events: {
url: 'https://www.google.com/calendar/feeds/[email protected]/public/basic',
className: 'gcal-event', // an option!
currentTimezone: 'America/Chicago' // an option!
}
});
});

I have defaultView: 'basicWeek' in my fullcalendar.js file.

I have gone through the thorough documentation but could not figure out what setting to change. I have done searching online on this for almost a month but have not seen any questions relating to this issue. I suppose I may just need to update a parameter in the JavaScript somewhere. I am reporting it here just in case it may be a software issue.

Any help would be appreciated.

2.1.1.0 seems to have broken file includes

I tried to upgrade from 2.0.2.0 (which works fine) to 2.1.1.0. I followed the readme, changing the gcal requirement to fullcalendar/gcal. Bundled, restarted rails server. I get errors in the console that it cannot find variable moment, gcal and undefined method fullCalendar.

Downgrading fixes my problem in the meantime. I'm running Rails 4.1.6 on Ruby 2.1.4. Cheers!

Upgrade to 2.10

Hi,

Just checking if you will have time to do the latest full version update, 2.10? It has quite a lot of changes but none that should effect your repository, more for how it is used.

I don't know how to help or I would help you do it. Thanks for your effort.

Change language of calendar

the option "locale" does not work, the solution is adding the following line to aplication.js
//= require fullcalendar/locale-all
maybe you can add it to the readme

Documentation for styling

Is it helpful to offer styling guidance? So people can adjust SCSS/CSS to customize their implementations? Happy help with such documentation.

FullCanlendar don't working for Rails 4

I to do all task as guide.

I use Rails 4.

Installation

In order to install the fullcalendar-rails gem and get FullCalendar working within your application, do the following steps:

Add to gemfile

gem 'fullcalendar-rails'
gem 'momentjs-rails'
Bundle install and restart rails server.

Add to application.js

//= require moment
//= require fullcalendar

$('#calendar').fullCalendar({});
Add to application.css

*= require fullcalendar
In view, include the following html:

## But, it does not show calendar in views.

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.