Table: RailsNotes
User: dreamable
Created at: 2020-11-06 23:43:37 UTC
Updated at: 2020-11-07 00:39:36 UTC
Reference:(Table ID 3, Record ID 2)

标题 :
Calendar
笔记 :

simple_calendar or DIY

  1. gem
    gem simple_calendar

  2. scss
    include the default stylesheet for the calendar in your app/assets/stylesheets/application.css file

    *= require simple_calendar
    

    highlight start-date in app/assets/stylesheets/simple-calender.scss

    .simple-calendar {
      .start-date {
          background-color: coral
      }
    }
    
  3. views

    <%= month_calendar start_date_param: :date  do |date| %>
      <%= date.day %>
    <% end %>
    
Tag: