Date Picker Doesn't send payload if clicking on already selected

Date picker doesn't send a payload if I click on the 'pre-selected' date. i am forced to click on other date and then the required date to get the payload.

Is this expected ? if not how do i get the payload returned ?

datepick

Are you running latest as this post suggest that was fixed

NR Version is 2.2.0
Dashboard is 3.1.5

How do I check if I have the latest version ?

image
image

Go to npm or the flow site and check the version that's been published.

You can also look in node-red palette manager. If your browser has an internet connection and there is an update in the flows library, it should show in the palette manager.

So I do have the latest of both Node-Red and Dashboard.

May be report the issue on Github then.

bumping this issue again, to see if some one can help.
i am not well versed with raising issues in git-hub.i had raised the issue , but looks like it is closed as solved. apparently i still have the same issue.

problem:
the ui-date picker in dashboard, does not send payload if previously selected date is selected again.

@dceejay
Sorry for tagging. but i am really stuck at this, i need to be able to generate an output if i select the same date which is already chosen in the datepicker
I had raised a GITHUB issue, and it is closed by you saying issue resolved. but i am still getting the same issue.

Why?
If you select the date and store it context/join, then the user sees what date is selected. Why would they need to select the same date again, as it is already selected.

Or use ui-form and you can submit the date any number of times
e.g.

[{"id":"fc140018f471d0c6","type":"ui_form","z":"b9860b4b9de8c8da","name":"","label":"","group":"2d4fe667.28f8ba","order":26,"width":0,"height":0,"options":[{"label":"Date","value":"date","type":"date","required":true,"rows":null}],"formValue":{"date":""},"payload":"","submit":"submit","cancel":"","topic":"topic","topicType":"msg","splitLayout":"","className":"","x":530,"y":3740,"wires":[["4381a612dddbc680"]]},{"id":"4381a612dddbc680","type":"change","z":"b9860b4b9de8c8da","name":"","rules":[],"action":"","property":"","from":"","to":"","reg":false,"x":625,"y":3740,"wires":[["e2dd345373669027","fc140018f471d0c6"]],"l":false},{"id":"e2dd345373669027","type":"change","z":"b9860b4b9de8c8da","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"$toMillis($$.payload.date)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":750,"y":3740,"wires":[["86efeee8d29d4bd3"]]},{"id":"86efeee8d29d4bd3","type":"debug","z":"b9860b4b9de8c8da","name":"debug 299","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":950,"y":3680,"wires":[]},{"id":"2d4fe667.28f8ba","type":"ui_group","name":"demo","tab":"1caa8458.b17814","order":2,"disp":true,"width":"12","collapse":false,"className":""},{"id":"1caa8458.b17814","type":"ui_tab","name":"Demo","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

Yes Indeed, the selected date is stored in context and is being used, but my flow uses, selection of date from a datepicker as a trigger to start next flow (to run a mysql query actually) with the selected date.
However my flow has two date pickers, one to select start date and one to select end date if the user wants to change only the start date or end date, the query is not triggered, causing some inconvinience. I currently have a work around to trigger the flow with a button on dashboard after date is selected. somehow i dont like that 'select-select-execute' routine, while it is possible to chose different dates than previously selected and execute the flow automatically.
may be i am nit picking, but since the GitHub issue was closed saying it was done, i was curious why i am unable to get the same result.

I would like to have any other solution as well, i am currently looking into a date picker whcih has both start and end date selection in the same widget, but a very huge learning curve for me using template node to get date picker ..

I could use this, but it is similar to work around i have to use a button after selecting the date.

If you use a join and change a date the output is triggered
e.g.

[{"id":"43ee72e02d93931a","type":"ui_date_picker","z":"b9860b4b9de8c8da","name":"","label":"date","group":"2d4fe667.28f8ba","order":25,"width":0,"height":0,"passthru":true,"topic":"start","topicType":"str","className":"","x":530,"y":3680,"wires":[["011ecc9a3a6b097d"]]},{"id":"011ecc9a3a6b097d","type":"join","z":"b9860b4b9de8c8da","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":670,"y":3700,"wires":[["86efeee8d29d4bd3"]]},{"id":"7da9d908a168286d","type":"ui_date_picker","z":"b9860b4b9de8c8da","name":"","label":"date","group":"2d4fe667.28f8ba","order":25,"width":0,"height":0,"passthru":true,"topic":"end","topicType":"str","className":"","x":530,"y":3740,"wires":[["011ecc9a3a6b097d"]]},{"id":"86efeee8d29d4bd3","type":"debug","z":"b9860b4b9de8c8da","name":"debug 299","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":910,"y":3700,"wires":[]},{"id":"2d4fe667.28f8ba","type":"ui_group","name":"demo","tab":"1caa8458.b17814","order":2,"disp":true,"width":"12","collapse":false,"className":""},{"id":"1caa8458.b17814","type":"ui_tab","name":"Demo","icon":"dashboard","order":1,"disabled":false,"hidden":false}]
1 Like

this could work for me. thanks a lot. every time I change atleast one date out of the two, a payload is resulted, whcih i can use to trigger the next flow.

curious though, is it possible to make the datepicker give out msg.payload if we click the already selected date ?

Not as far as i know, would be possible if you could reset the date picker node with say msg.reset, but sadly not possible.

Hi,

indeed hmm - oops... there is a flag that is used in widgets to let them only send things if they change... and indeed the "fix" that closed the issue did change that to set it correctly..... however... the angular directive also had it's own attribute that did the same client side... (ng-change) - I have now set that to be ng-blur instead so it should now send whenever the date window is closed - so that should now send whatever the value.

Fix is in master branch on github - not yet on npm (probably later this week).

2 Likes

Its working now in Dashboard 3.5.0

Huge Thanks! :pray:

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