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.

    read csv-data and put it in an array

    Scheduled Pinned Locked Moved Utilities
    313 Posts 3 Posters 440.0k Views 4 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.
    • PerlchampP Offline
      Perlchamp
      last edited by

      before looking in dev: i saw the following:

      var birth_date_moment = moment(birth_date + now.getYear(),"DD.MMYYYY");
      

      change to DD.MM.YYYY (point between MM and YYYY) ?

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

        @Perlchamp no, cause we extract dd.mm from the info provided in file…

        oh, the substring should be 0,5, not 0,4

        var birth_date = birthday.birth.substring(0,5);
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • PerlchampP Offline
          Perlchamp
          last edited by

          error => now.getYear() is not a function

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

            @Perlchamp yeh, sorry, rememeber just off the top of my head…
            date uses that …
            moment its just year()

            var birth_date_moment = moment(birth_date + now.year(),“DD.MMYYYY”);

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • PerlchampP Offline
              Perlchamp
              last edited by

              nothing changed. but now i see the HAVEDATA notification again. could it be, that the Dom-update (from notification) not really goes ?
              i mean i saw in the dev, that the birthday-data are right. it was the first entry of this data-string (or jsonObj) …
              only the header i can see …

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

                @Perlchamp put a stop on the statement self.updateDom()

                hit refresh, the code should stop there, then mouse over the this.active_birthdays a few lines up,
                the debugger will surface the values

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • PerlchampP Offline
                  Perlchamp
                  last edited by

                  displays the last row of the data-string, though the data from first to last are looped. for me it seems correct there …

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

                    @Perlchamp ok, put a stop on the 1st line of getDom()

                    it will be called before you get data, then your notification will be called
                    and then getdom() again… and u can watch it go thru the code

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • PerlchampP Offline
                      Perlchamp
                      last edited by

                      yes it does … i changed innerText to innerHTML but nothing.

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

                        @Perlchamp ok, inner HTML is when u are inserting html… my code inserts text…

                        did u have a position: in config definition for module?

                        		{
                        			module: "SampleModule",
                        			disabled: false, 
                        			position: 'middle',
                        			config: {
                        				days_forward:4,
                        			}
                        		}
                        

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 31
                        • 32
                        • 2 / 32
                        • 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