BUG: Date picker format does not match Dashboard -> Site -> Date format

Node-RED version: v0.20.5
Node.js version: v10.15.3
Dashboard version 2.15.4

The ui_date_picker node says

The date display can be formatted in the Dashboard - Site tab using moment.js formatting. For example MM/DD/YYYY , Do MMM YYYY or YYYY-MM-DD .

However it alway comes up in the form 9 Jun 2019 no matter what I put in Dashboard -> Site -> Date Format

Yes, you appear to be correct - a bug?

I was hoping someone would agree :grinning: I notified Dave and will change the title and add 'BUG'

Closed by fix in latest master on github.

1 Like

That was fast :grinning:

In have the follow String:
{"Nr":4,"Inhalt":"Fish","Menge":"500","Fach":7,"Ablauf":"2023-12-30T23:00:00.000Z"}
I want to change the format to
"2023-12-30"
The entry in format Date:
moment().format('YYYY-MM-DD');
has no effect. What is wrong? My mariaDB does not accept the apprndix "T23:00:00.000Z"
best regards
HaJueG

@hajueG Welcome to the forum!

Seeing that this thread is four years old, I'm going to close this thread and ask you to open a new thread.

Your question does not appear to be related to the thread you have posted, so you would have been better to start a new thread. However one possibility is shown below. If you have further questions please start a new thread.

In a function node you can use substring to extract the first 10 characters of the datetime string. Assuming the data you show is in msg.payload then you do
msg.payload.Ablauf = msg.payload.Ablauf.substring(0,10)

Example

[{"id":"9105fd5fb3a348c3","type":"inject","z":"bdd7be38.d3b55","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"Nr\":4,\"Inhalt\":\"Fish\",\"Menge\":\"500\",\"Fach\":7,\"Ablauf\":\"2023-12-30T23:00:00.000Z\"}","payloadType":"json","x":360,"y":2000,"wires":[["95693fda06b53eff"]]},{"id":"95693fda06b53eff","type":"function","z":"bdd7be38.d3b55","name":"function 3","func":"msg.payload.Ablauf = msg.payload.Ablauf.substring(0,10)\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":510,"y":2000,"wires":[["f226f8db207e1cc4"]]},{"id":"f226f8db207e1cc4","type":"debug","z":"bdd7be38.d3b55","name":"debug 100","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":710,"y":2000,"wires":[]}]
1 Like