All threads / SimpleCalendar 1.1 released! Discussion

Ask A Question

Notifications

You’re not receiving notifications from this thread.

SimpleCalendar 1.1 released! Discussion

Chris Oliver asked in General
Abhiram ·

Do you have a demo for this??

It just generates an HTML table, so there are no CSS styles applied by default. That's up to you. Here's a screenshot of it using Bootstrap. http://cl.ly/VYjp and an older version in use here at www.seattleastro.org/events...

DeeDee Lavinder ·

Glad to have found simple_calendar. Thank you! Are there images missing or not displaying properly above? There are empty panels with captions above them saying things like, "You can make a 4 day agenda calendar:" I am trying to learn and understand all I can about simple_calendar in order to implement it in my app as soon as possible. Thank you again for your time and energy on this program.

Updated the post to show the code for those. I'll point you to the Github page for the latest info on the gem though: https://github.com/excid3/s...

DeeDee Lavinder ·

Thank you so much!

Is it possible to display a weekly calendar with days going from Monday to Friday only? This is to make student timetable.

Yes, but you would want to create a custom class that inherits from the main calendar. You can take a look at this as an example and adapt it to be a business-week calendar. https://github.com/excid3/s...

I'm a newbie in Ruby and Rails as well, but I guess what you mean is to change this:

number_of_weeks = options.fetch(:number_of_weeks, 1) number_of_days = (number_of_weeks * 7) - 1

into this:

number_of_days = (number_of_weeks * 5) - 1

Is that it ??

Another option I just thought about is that you could use CSS to hide the weekends (the first and last TDs in each column) and render the normal week_calendar.

I will go for this one. Thanks

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 33,665+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.