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.

    Calendar Module - I only want one Dateformat.

    Scheduled Pinned Locked Moved Troubleshooting
    1 Posts 1 Posters 1.0k Views 1 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.
    • C Offline
      carnifex82
      last edited by

      Hi guys,

      I only want dates in the calendar module displayed as DD.MM. as the weekday names take up a lot of space.

      So I disabled all the relative time formats:

                                           colored: false,
                                              maximumNumberOfDays: 180,
                                              wrapEvents: true,
                                              dateFormat: "DD.MM.",
                                              timeFormat: "absolute",
                                              getRelative: 0,
                                              urgency: 0,
                                              calendars:
      
      

      Yet, I get this picture:

      0_1522507794494_mmmcal.JPG

      Looking at the source, it seems you can’t disable this.

      If I just remove this block from calendar.js, it works for me:

                   if (event.startDate - now < 2 * oneDay) {
                                                      // This event is within the next 48 hours (2 days)
                                                      if (event.startDate - now < this.config.getRelative * oneHour) {
                                                              // If event is within 6 hour, display 'in xxx' time format or moment.fromNow()
                                                              timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").fromNow());
                                                      } else {
                                                              // Otherwise just say 'Today/Tomorrow at such-n-such time'
                                                              timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").calendar());
                                                      }
      
      

      However, this is not update proof :( Any other ideas?

      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