fullcalendar-rails | asset gem containing Adam Shaw 's excellent fullcalendar | Plugin library
kandi X-RAY | fullcalendar-rails Summary
kandi X-RAY | fullcalendar-rails Summary
an asset gem containing Adam Shaw's excellent fullcalendar jquery plugin
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of fullcalendar-rails
fullcalendar-rails Key Features
fullcalendar-rails Examples and Code Snippets
Community Discussions
Trending Discussions on fullcalendar-rails
QUESTION
I'm fairly new to Rails and programming in general, and I'm trying to add fullcalendar-rails
to a fairly basic new application. Unfortunately, the install process seems to fail entirely.
Following the instructions provided at https://github.com/bokmann/fullcalendar-rails, after ensuring that javascript in general is enabled in the app (making sure I have jquery etc installed), results in an error claiming $(...).fullCalendar is not a function
. This makes it seem to me that the fullcalendar
source files are simply not being seen by my Rails app, and I'm not sure how to go about getting them to be seen. I tried manually adding the files to my app structure (in /lib
and /vendor
), and that had no effect.
For reference, my application.js
is this:
ANSWER
Answered 2021-Oct-14 at 13:55That gem is for Asset Pipeline which you don't use. You are on webpacker and inside javascript files you need to use import/require
. //= require something
does not work. Feel free to remove those gems.
With webpacker you need to add packages with yarn:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install fullcalendar-rails
Add to gemfile gem 'fullcalendar-rails' gem 'momentjs-rails'
Bundle install and restart rails server.
Add to application.js //= require moment //= require fullcalendar //= require fullcalendar/locale-all $('#calendar').fullCalendar({}); The line //= require fullcalendar/locale-all is just necessary if you need the calendar in another language than english.
Add to application.css *= require fullcalendar
In view, include the following html: <div id="calendar"></div> Now if you go to that view you should see the FullCalendar.
Reference the Using FullCalendar section for details on populating FullCalendar.
After following the above instalations steps, you may choose to use the fullcalendar-print file within your application to better customize the appearance of FullCalendar. To do so, follow these steps:.
Option 1: Add to application.css *= require fullcalendar.print Note: This method causes issues with changing the color of events within FullCalendar, pointed out in issue #11.
Option 2: Create application-print.css.scss. Add to application-print.css.scss @import 'fullcalendar.print'; Add to config/application.rb config.assets.precompile += ['application-print.css'] Add to layouts <%= stylesheet_link_tag "application-print", :media => "print" %>
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page