• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Different Calendars in different colors

Scheduled Pinned Locked Moved Feature Requests
7 Posts 4 Posters 4.8k Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    amanzimdwini
    last edited by Mar 6, 2017, 6:58 AM

    I looked through the dox but could not find any hints… we have 8 different calendars (spouse / children / carpools / etc). Can they be color coded individually? Would be a great feature…

    B 1 Reply Last reply Mar 6, 2017, 7:55 AM Reply Quote 0
    • B Offline
      broberg Project Sponsor @amanzimdwini
      last edited by Mar 6, 2017, 7:55 AM

      @amanzimdwini

      You can alter the styling of each calendar yes if you are running multiple instances of the calendars. By using the custom.css file.

      depending on which order you put them in the config they are configured like this :

      #module_7_calendar {
      color: red}
      #module_8_calendar {
      color: blue}
      #module_9_calendar {
      color: pink}
      #module_10_calendar {
      color: green}
      
      

      The number of the modules starts with 0 which in most cases are the alert module in the config. ( #module_0_alert )

      A 1 Reply Last reply Mar 6, 2017, 2:41 PM Reply Quote 1
      • A Offline
        amanzimdwini @broberg
        last edited by Mar 6, 2017, 2:41 PM

        @broberg COOL!!! (Was I supposed to have been able to figure that out from the documentation?) Working on it now. Close topic

        Y 1 Reply Last reply Mar 6, 2017, 2:47 PM Reply Quote 0
        • Y Offline
          yawns Moderator @amanzimdwini
          last edited by Mar 6, 2017, 2:47 PM

          @amanzimdwini
          No, this is not mentioned in the readme. The css styles are a bit “hackish” ;)

          As broberg said you have to add multiple calendar instances. So instead of

          {
          	module: 'calendar',
          	position: 'top_left',   // This can be any of the regions. Best results in left or right regions.
          	config: {
          		calendars: [
          		{
          			url: 'http://www.calendarlabs.com/templates/ical/US-Holidays.ics',
          			symbol: 'calendar',
                  },
          		{
          			url: 'whatever',
          			symbol: 'calendar',
                  }
              ]
          	}
          }
          

          you go for

          {
          	module: 'calendar',
          	position: 'top_left',   // This can be any of the regions. Best results in left or right regions.
          	config: {
          		calendars: [
          		{
          			url: 'http://www.calendarlabs.com/templates/ical/US-Holidays.ics',
          			symbol: 'calendar',
                  }
              ]
          	}
          },
          {
          	module: 'calendar',
          	position: 'top_left',   // This can be any of the regions. Best results in left or right regions.
          	config: {
          		calendars: [
          		{
          			url: 'whatever',
          			symbol: 'calendar',
                  }
              ]
          	}
          }
          

          Downside is, that you don’t see recent entries of all calendars next to each other, because every calendar instance is sorting on its own

          A 1 Reply Last reply Mar 6, 2017, 2:50 PM Reply Quote 0
          • A Offline
            amanzimdwini @yawns
            last edited by Mar 6, 2017, 2:50 PM

            @yawns Argh. THAT is a downside, explains the results I got) - and brings back the original request.

            But it did give me other good ideas Re: custom.css (which is, indeed, and bit “hackish”)

            Thanks,

            S 1 Reply Last reply Mar 6, 2017, 2:53 PM Reply Quote 0
            • S Offline
              strawberry 3.141 Project Sponsor Module Developer @amanzimdwini
              last edited by Mar 6, 2017, 2:53 PM

              @amanzimdwini in the upcoming version there will be color support https://github.com/MichMich/MagicMirror/tree/develop/modules/default/calendar#calendar-configuration

              Please create a github issue if you need help, so I can keep track

              A 1 Reply Last reply Mar 6, 2017, 2:56 PM Reply Quote 3
              • A Offline
                amanzimdwini @strawberry 3.141
                last edited by Mar 6, 2017, 2:56 PM

                @strawberry-3.141
                I’m going beta later today :) This is great.

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                1 / 1
                • First post
                  2/7
                  Last post
                Enjoying MagicMirror? Please consider a donation!
                MagicMirror created by Michael Teeuw.
                Forum managed by Sam, technical setup by Karsten.
                This forum is using NodeBB as its core | Contributors
                Contact | Privacy Policy