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.

    Applying CSS to individual cells in a table

    Scheduled Pinned Locked Moved Custom CSS
    7 Posts 3 Posters 1.3k 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.
    • ankonaskiff17A Offline
      ankonaskiff17 @sdetweil
      last edited by

      @sdetweil What is “jumpy”? Is it similar to say moment.js or other similar libraries? I know I read a bunch of stuff relating to moment.js battling with the calendar module to see if I could figure out how to make the calendar module just show a date which I failed to succeed in doing.

      S cowboysdudeC 3 Replies Last reply Reply Quote 0
      • S Offline
        sdetweil @ankonaskiff17
        last edited by sdetweil

        @ankonaskiff17 those are just names of variables

        var xjumpy = document.createElement(“th”);
        var ajumpy = document.createElement(“th”);
        var bjumpy = document.createElement(“th”);

        no idea why he called them that name

        so xjumpy is a th
        and ajumpy is also
        and bjumpy is also

        I would have called them
        stationColumnHeader
        priceColumnHeader
        distanceColumnHeader

        i have this little function i use when doing the content via elements

               // create document element worker
        	createEl : function (type, id, className, parent, value) {
        		var el= document.createElement(type)
        		if(id)
        			el.id = id
        		if(className)
        			el.className = className
        		if(parent)
        			parent.appendChild(el)
        		if(value) {
        			var e = document.createTextNode(value)
        			el.appendChild(e)
        		}
        
        		return el
        	},
        

        u can create and element, set its id, add a class, set its parent and add its value all in one stmt… reduces the size of the code u write, (but not the amount of code you execute)

        from my bdlist module ,using it

        	var table = this.createEl("table", "birthday-table","TABLE", wrapper, null);
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @ankonaskiff17
          last edited by

          @ankonaskiff17 said in Applying CSS to individual cells in a table:

          I could figure out how to make the calendar module just show a date which I failed to succeed in doing.

          what do you want to do there?

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          ankonaskiff17A 1 Reply Last reply Reply Quote 0
          • cowboysdudeC Offline
            cowboysdude Module Developer @ankonaskiff17
            last edited by

            @ankonaskiff17 Called boredom LOL

            1 Reply Last reply Reply Quote 0
            • ankonaskiff17A Offline
              ankonaskiff17 @sdetweil
              last edited by

              @sdetweil Have it read MM/DD/YY, even on the day of event.
              Either 6 or 7 days out from calendar event, the date swaps from MM/DD/YY to Monday at 12:00 AM. (For US Labor Day holiday, in this case)
              hideTimegets me to it just showing Monday.

              I thought getRelative: 0, was used to do what I want it to do, You have option of from between 0 - 48 hours with default being 6 hours it goes to relative time. It is swapping at about 6 - 7 DAYS in reality. Maybe just a coincidence but it seems like the default getRelative: 6;is 6 days, not hours, and setting it to zero has no effect.

              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