Dashboard - ui_date_picker only results in "invalid date"

Hi,

i have two docker NR instances which are almost exactly the same. The just grab data from MQTT and present them in a dashboard. So far so good.

I implemented a ui_date_picker in the first dashboard, send the data to MQTT and everything works fine.

I implemented a ui_date_picker in the second dashboard, send the data debug and nothing works. After deploying, the dashboard shows up with the datepicker empty(seems ok to me) and when i choose any date, it immediately jumps to the message "invalid date" if I want to choose a new date, the ui_date_picker jumps to the Jan 1st 1880 and independently of which date I choose, I just get "invalid date".

There are no error messages, nothing to catch in NR, the only thing I have is the JS Message from Chrome

Error: The ng-model for md-datepicker must be a Date instance or a value that can be parsed into a date. Currently the model is of type: number
    at Array.<anonymous> (app.min.js:469)
    at Object.$$format (app.min.js:332)
    at Object.$processModelValue (app.min.js:332)
    at Object.$$setModelValue (app.min.js:333)
    at app.min.js:221
    at m.$digest (app.min.js:172)
    at m.$apply (app.min.js:176)
    at app.min.js:593
    at r.<anonymous> (app.min.js:594)
    at r.emit (index.js:83)
(anonymous) @ app.min.js:148

Any ideas?

Welcome to the forum @bausi2k.
Have you got a wire connected to the input? If so then disconnect it and see what happens.
Otherwise can you export that node and paste it here please. Use the </> button when pasting it in.

nope, just the date_picker and a debug node. Also if i only add a note_picker, without anything, the same error happens.

My 2 NRs run on in 2 docker container, which are hosted on my synology.

Thanks for the warm welcome.

Something very odd is going on then. Have you possibly installed two dashboards, the standard one and one of the alternatives? If so then uninstall the extra ones, they don't play well together.
Looking at your post again I see you mention note_picker but I don't know what that is, so I wonder whether you are using an unusual system or have installed a non-standard dashboard.
If you don't know then tell us what hardware and OS you are running on and how you installed node-red.
Also please start node-red in a terminal and post the log here. Use the </> button and paste it in to stop the forum messing with the layout. It should start with the welcome to node red message.

Hi,

sorry for the "note_picker" thing, my brain was wondering around.
Within the Docker container there is no other or alternative dashboard installed. The second dashboard is on a different container which is also on anther port on the physical machine.


> node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data"
13 Aug 04:50:27 - [info] 
Welcome to Node-RED
===================
13 Aug 04:50:27 - [info] Node-RED version: v1.1.3
13 Aug 04:50:27 - [info] Node.js  version: v10.22.0
13 Aug 04:50:27 - [info] Linux 4.4.59+ x64 LE
13 Aug 04:50:28 - [info] Loading palette nodes
13 Aug 04:50:29 - [info] Dashboard version 2.23.2 started at /ui
13 Aug 04:50:29 - [info] Settings file  : /data/settings.js
13 Aug 04:50:29 - [info] Context store  : 'default' [module=memory]
13 Aug 04:50:29 - [info] User directory : /data
13 Aug 04:50:29 - [warn] Projects disabled : editorTheme.projects.enabled=false
13 Aug 04:50:29 - [info] Flows file     : /data/flows.json
13 Aug 04:50:29 - [info] Server now running at http://127.0.0.1:1881/

Even if I add a new blank date_picker, it is not working...

I also tried to pick a date in Safari on my Mac, same error in the (Safari)debug window.

So, i deleted the dashboard from my palette, restarted the docker container, reinstalled the dashboard and imported my flows...
still the same.

I even restarted my Synology to prove...

Well I am out of ideas on this, anyone else?

I think the solution will be to spinn up a new docker container with a new dashboard...

As a test...
try this once more but DONT import your flows, try building a new simple flow with a date picker on - see if that works.

OK, I tired the following thing:

same container, fresh start:

  • delete everything from my dashboard
  • uninstalled dashboard
  • restarted the docker container
  • added a date_picker

-> 'invalid date'

clean docker instance:

  • spun up a new instance
  • installed dashboard
  • added a ui_date_picker

-> 'invalid date'

I'm really out of ideas now...

I've tried something new. When I spin up a NR docker container, I usually set a TimeZone. Without setting a TimeZone it worked with a clean container...

I guess we can close this post! After playing around with serveral options, it came to my mind, that this might me the reason:

ui: { path: "ui", readOnly: true },

after deleting the readOnly: true part, everything worked fine!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.