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.

    Max Entry issue with Default Calendar Module

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    5 Posts 2 Posters 593 Views 2 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.
    • V Offline
      Vanstone
      last edited by

      I am currently using the default calendar module with only one google calendar. I would like to have more than 10 entries in the event list. I assumed that using maximumEntries would do the trick…but upon some digging and debugging the code I have found that it constrains the list to the default value set in calendar.js regardless of my maximumEntries config value (even though documentation says I can have up to 100).

      In debugging I found that my event array comes back from Google with 999 entries. Then the event list is sliced down to 18 (since this is my config value) and then later it is further sliced to 10 (the default value set on line 12 of calendar.js) – here is the code line that takes my event array from 18 to 10 :

      return events.slice(0, this.config.maximumEntries); (calendar.js 661)
      

      I may be missing something but this seems like a bug and wanted to know if I am missing some developer intention before reporting it as such (on a side note it seems that the fade property also cannot be set via the config) - likely whatever is setting this.config is not pulling in the config file values but leaving them as set in the defaults section.

      My Config Section:
      {
      module: “calendar”,
      header: “Family Events”,
      position: “middle_center”,
      config: {
      calendars: [
      { maximumEntries: 18,
      fetchInterval: 7 * 24 * 60 * 60 * 1000,
      symbol: “calendar-check”,
      url: "https://calendar.google.com/calendar/i

      **** Using MM v2.24.0 ***

      S 1 Reply Last reply Reply Quote 0
      • S Away
        sdetweil @Vanstone
        last edited by

        @Vanstone maxinumEntries is not calendar specific. move it above the calendars:[
        line

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • V Offline
          Vanstone
          last edited by

          Thanks for responding. I changed the position to be at the module level but the change had no affect. If I have the MaximumEntries in the specific calendar scope it does work if I constrain the MaximumEntries to less than 10 (say 3 for example). If I constrain it to 3 with the MaximumEntries at the module level it does not affect the number of entries. So I am still in the same boat.

          S 1 Reply Last reply Reply Quote 0
          • S Away
            sdetweil @Vanstone
            last edited by

            @Vanstone show me the new config, x out the url

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • V Offline
              Vanstone
              last edited by sdetweil

              {
              			module: "calendar",
              			header: "Family Events",
              			position: "middle_center",
              			maximumEntries: 3, // <---- down one line after config:{, before calendars:[
              			config: {
              				calendars: [
              					{
              					
              						
              						fetchInterval: 7 * 24 * 60 * 60 * 1000,
              						symbol: "calendar-check",
              						url: "https://calendar.google.com/calendar/ical/orfr24if0dittkie6ml35f0bes%40group.calendar.google.com/private-XXXXXXXXXXXX/basic.ics"
              						
              						
              					}
              				]
              			}
              		}
              
              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                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