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

**URL:** https://discourse.nodered.org/t/date-picker-doesnt-send-payload-if-clicking-on-already-selected/57455
**Category:** Dashboard
**Created:** [29 January 2022 11:47 UTC](https://discourse.nodered.org/t/date-picker-doesnt-send-payload-if-clicking-on-already-selected/57455 "2022-01-29T11:47:14Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [29 January 2022 11:47 UTC](https://discourse.nodered.org/t/date-picker-doesnt-send-payload-if-clicking-on-already-selected/57455/1 "2022-01-29T11:47:14Z")

</div>

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](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/c/dcef6114f63c8ec0fb59d0d8b9deedeb74eb0c01.gif)

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [29 January 2022 12:22 UTC](https://discourse.nodered.org/t/date-picker-doesnt-send-payload-if-clicking-on-already-selected/57455/2 "2022-01-29T12:22:07Z")

</div>

Are you running latest as this post suggest that was fixed

> [@House dashboard, tab display problem](https://discourse.nodered.org/t/house-dashboard-tab-display-problem/57253/10):
>
> 3.1.3: Maintenance Release Fixes Remove main entry from package.json. Issue #740 Let date-picker send repeated existing values. Warn if Node.js version not 12+. Allow ui-dropdown to accept single string for one valid option. Fix socketid back to be in sync with reality. Issue #738

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [29 January 2022 13:33 UTC](https://discourse.nodered.org/t/date-picker-doesnt-send-payload-if-clicking-on-already-selected/57455/3 "2022-01-29T13:33:13Z")

</div>

NR Version is 2.2.0  
Dashboard is 3.1.5

How do I check if I have the latest version ?

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/6/d61577fdb85af723836cbced5aa4fe90beeb22ac.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/0/c03f0d4acd47e0f1a55c31855a4aa2780c361813.png)

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [29 January 2022 13:45 UTC](https://discourse.nodered.org/t/date-picker-doesnt-send-payload-if-clicking-on-already-selected/57455/4 "2022-01-29T13:45:13Z")

</div>

> [@smanjunath211](#):
>
> How do I check if I have the latest version

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.

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [29 January 2022 13:48 UTC](https://discourse.nodered.org/t/date-picker-doesnt-send-payload-if-clicking-on-already-selected/57455/5 "2022-01-29T13:48:28Z")

</div>

> [@E1cid](#):
>
> Are you running latest as this post suggest that was fixed

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

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [29 January 2022 13:57 UTC](https://discourse.nodered.org/t/date-picker-doesnt-send-payload-if-clicking-on-already-selected/57455/6 "2022-01-29T13:57:09Z")

</div>

May be report the issue on Github then.

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [18 May 2023 05:13 UTC](https://discourse.nodered.org/t/date-picker-doesnt-send-payload-if-clicking-on-already-selected/57455/7 "2023-05-18T05:13:43Z")

</div>

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.

> [@House dashboard, tab display problem](https://discourse.nodered.org/t/house-dashboard-tab-display-problem/57253/13):
>

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [24 May 2023 10:52 UTC](https://discourse.nodered.org/t/date-picker-doesnt-send-payload-if-clicking-on-already-selected/57455/8 "2023-05-24T10:52:08Z")

</div>

@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.

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [24 May 2023 11:21 UTC](https://discourse.nodered.org/t/date-picker-doesnt-send-payload-if-clicking-on-already-selected/57455/9 "2023-05-24T11:21:59Z")

</div>

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.

```auto
[{"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}]

```

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [24 May 2023 14:47 UTC](https://discourse.nodered.org/t/date-picker-doesnt-send-payload-if-clicking-on-already-selected/57455/10 "2023-05-24T14:47:29Z")

</div>

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 ..

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [24 May 2023 14:51 UTC](https://discourse.nodered.org/t/date-picker-doesnt-send-payload-if-clicking-on-already-selected/57455/11 "2023-05-24T14:51:18Z")

</div>

> [@E1cid](#):
>
> Or use ui-form and you can submit the date any number of times

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

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [24 May 2023 15:04 UTC](https://discourse.nodered.org/t/date-picker-doesnt-send-payload-if-clicking-on-already-selected/57455/12 "2023-05-24T15:04:02Z")

</div>

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

```auto
[{"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}]

```

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [24 May 2023 15:11 UTC](https://discourse.nodered.org/t/date-picker-doesnt-send-payload-if-clicking-on-already-selected/57455/13 "2023-05-24T15:11:16Z")

</div>

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 ?

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [24 May 2023 15:29 UTC](https://discourse.nodered.org/t/date-picker-doesnt-send-payload-if-clicking-on-already-selected/57455/14 "2023-05-24T15:29:06Z")

</div>

> [@smanjunath211](#):
>
> 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.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [24 May 2023 16:12 UTC](https://discourse.nodered.org/t/date-picker-doesnt-send-payload-if-clicking-on-already-selected/57455/15 "2023-05-24T16:12:49Z")

</div>

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).

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [7 June 2023 15:41 UTC](https://discourse.nodered.org/t/date-picker-doesnt-send-payload-if-clicking-on-already-selected/57455/16 "2023-06-07T15:41:20Z")

</div>

Its working now in Dashboard 3.5.0

Huge Thanks! 🙏

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [21 June 2023 15:41 UTC](https://discourse.nodered.org/t/date-picker-doesnt-send-payload-if-clicking-on-already-selected/57455/17 "2023-06-21T15:41:41Z")

</div>

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