Dashboard date picker always sends TWO dates?

Hi,
i simply want to get one message with the day i picked.
How could i suppress the first message with the previous date?

Can you post a simple example demonstrating the problem? It should not send two messages.

The date picker sends only one message for sure.

But the text input if used as date picker sends another message when used with delay.

You can set the delay to 0. Then it sends message only when focus changed. (click outside)

Could it be, i have a different version of node-red dashboard nodes!?
My node-red is V3.0.2 and the dashboard is V3.2.3.
The date picker properties display looks different (see attached screendump!).

This is my test setup (the function is only to convert to readable date):
flows.json (1.9 KB)

I still see two messages when i select a day in the dashboard (first is the day it was set before and second is the selected day).

Sorry, i just noticed, that you were talking about "text input". I didn't know, that this could also be used as a date picker and so i didn't use it anyway.
I am talking about the "date picker"!
I experienced that behaviour on my running system but also on a different machine after a clear installation.

You are right, "text input" only sends one message, "date picker" still sends two messages.
Would you recommend using "text input". It annoys me a little, that "time" is relevant.
Actually i would need a range, when selecting a day (e.g. 01.12.22 00:00:00 - 01.12.22 23:59:59) but i could calculate that!

As I asked earlier, to avoid this confusion over the node type, please select it, then Export it, and paste it here. Then we know we are doing the same as you are.

But i did!
I pasted the flow containing my test setup with the "date picker".
But here again the node only:

[
    {
        "id": "7da3411b369b641f",
        "type": "ui_date_picker",
        "z": "5032d8e8ecd1a0df",
        "name": "",
        "label": "date",
        "group": "a685ef826a5f8b28",
        "order": 0,
        "width": 0,
        "height": 0,
        "passthru": true,
        "topic": "topic",
        "topicType": "str",
        "className": "",
        "x": 130,
        "y": 3040,
        "wires": [
            [
                "ab2dbae5cc669653"
            ]
        ]
    },
    {
        "id": "a685ef826a5f8b28",
        "type": "ui_group",
        "name": "Tag",
        "tab": "27bb70048447b82a",
        "order": 1,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "27bb70048447b82a",
        "type": "ui_tab",
        "name": "Date",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    }
]

or if you want as a file:
flows.json (918 Bytes)

Sorry I missed that, because you had posted it in a file, which is not the normal way. Inline is the normal way.

For me that only sends one message.
If you have just that node and feed it into a debug node do you see two messages each time you select a date?
Are you passing in a message to the Date node? I ask because I see you have specified that any message coming in will be passed through, which might be the extra message you are seeing.
Otherwise, please stop node red and start it again in a terminal window, and copy/paste here the startup log that you see. That will tell us information about your current setup.

Exactly!
Bildschirmfoto 2022-12-30 um 09.10.37
I open the dialog and it shows the previously selected date (yesterday). After selecting the current day (today) the debug shows two different messages:

I do not feed a message to the Date node and this doesn't make any difference!

See the log here:

Last login: Thu Dec 29 18:24:38 on ttys000
petervonwalter@MacMini ~ % node-red
30 Dec 09:17:41 - [info] 

Willkommen bei Node-RED
===================

30 Dec 09:17:41 - [info] Node-RED Version: v3.0.2
30 Dec 09:17:41 - [info] Node.js  Version: v18.12.1
30 Dec 09:17:41 - [info] Darwin 19.6.0 x64 LE
30 Dec 09:17:41 - [info] Paletten-Nodes werden geladen
30 Dec 09:17:42 - [info] Dashboard version 3.2.3 started at /ui
30 Dec 09:17:42 - [info] Einstellungsdatei: /Users/petervonwalter/.node-red/settings.js
30 Dec 09:17:42 - [info] Kontextspeicher: default [module=memory]
30 Dec 09:17:42 - [info] Benutzerverzeichnis: /Users/petervonwalter/.node-red
30 Dec 09:17:42 - [warn] Projekte deaktiviert: editorTheme.projects.enabled=false
30 Dec 09:17:42 - [info] Flow-Datei: /Users/petervonwalter/.node-red/flows.json
30 Dec 09:17:42 - [info] Server wird jetzt auf http://127.0.0.1:1880/ ausgeführt
30 Dec 09:17:42 - [warn] 
---------------------------------------------------------------------
Die Datei mit den Flow-Credentials wird mit einem vom System
generierten Schlüssel verschlüsselt.
Wenn der vom System generierte Schlüssel aus irgendeinem Grund
verloren geht, kann die Datei mit den Credentials nicht
wiederhergestellt werden. Sie muss dann gelöscht und die
Credentials müssen erneut eingestellt werden.
Es sollte ein eigener Schlüssel mit Hilfe der Option
'credentialSecret' in der Einstellungsdatei vorgegeben werden.
Node-RED wird dann die Datei mit den Flow-Credentials
bei der nächsten Übernahme (deploy) einer Änderung erneut
verschlüsseln.
---------------------------------------------------------------------
30 Dec 09:17:42 - [info] Flows werden gestartet
30 Dec 09:17:42 - [info] Flows sind gestartet

I do not see, what this helps!?
As i said, i see this same behaviour also on my test machine with a complete new and clean installation.

It suggests that you are running on a Mac, is that correct? It may be do do with that and/or the browser you are using. Is the other system you are running on a Mac? If so do you have a Windows or other Linux you can try it on?

Is there anyone else here that can try this on a Mac?

I copied your flow in my system and checked , it is giving only one message, even if i pass message from back stream (with pass through setting)

datepick_2_events

I am running Node-red 3.0.0 on windows , google chrome browser

You are right! I am running this as a test on a Mac Mini.
But my running system is a docker image on a Synology NAS! It shows the same behaviour!

It seems, that "date picker" always sends the previous date AND the selected date!
This would be a nice feature for me, because i actually need a date range.
But the problem is, that i cannot distinguish the two message as the first and the second!?
Is there a solution for this?

Funny!
If i trigger the "date picker" with a time stamp message, as you may do, i also only get ONE message at the output!
But only if i select " If msg arrives on input, pass through to output: "
Otherwise i see NO message at all!
Could you try from the dashboard!

I think that's perfectly normal and expected behavior

Do you mean, normal behaviour (2 messages) when selecting from dashboard!?

No, you said i get a message when pass through is enabled, otherwise no message.

Only for you, for some reason.

Is that still running the browser on the Mac. It is probably a browser related issue. Can you try a different browser, and also try running the browser on a Windows machine?

Yes! I use the same browser. I will check that!
Thanks Colin!

That is really crazy! I would never have thought of this.
Colin, you were right!
I used Chrome for a test now and it really triggers only ONE message when selecting a date on the dashboard.
Unfortunately i still would like to prefer to use Safari, because this is the standard browser also on iOS.
So i don't really know what to do now.
Does anybody know how to overcome that?
How could i suppress this first, erroneous message?

The date picker GUI is actually provided by the browser, so it must be sending the two messages.
You could do the suppression of the first message in a function node, but it would be made more complex by the fact that, presumably, if a second one did not appear within a short time you would want to pass on the first one. I feel it ought to be possible with a Trigger node. I have an idea. Watch this space.