How to restrict dates to only greater than the one selected

How can i make a pair of datepickers, where the first one i select makes it so the other one cant pick a date earlier than the one that is already picked?

Edit: preferably in a Form node, hotNipis solution works for individual datepicker nodes though

This way maybe

[{"id":"32423a30.627606","type":"ui_date_picker","z":"c0ddb509.b04f48","name":"","label":"select","group":"93fae10c.09faa","order":9,"width":0,"height":0,"passthru":false,"topic":"topic","topicType":"msg","x":390,"y":2800,"wires":[["56a8ab72.4dd374"]]},{"id":"56a8ab72.4dd374","type":"function","z":"c0ddb509.b04f48","name":"minimum check","func":"let m = flow.get('minimumDate') || 0\nif(msg.payload < m){\n    msg.payload = m\n    return [msg,null];\n}else{\n    return [null,msg]\n}\n","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":560,"y":2800,"wires":[["32423a30.627606"],["df248e63.c0ddf"]]},{"id":"3118eafa.1a2656","type":"ui_date_picker","z":"c0ddb509.b04f48","name":"","label":"minimum","group":"93fae10c.09faa","order":9,"width":0,"height":0,"passthru":false,"topic":"topic","topicType":"msg","x":380,"y":2740,"wires":[["f88512.13234af"]]},{"id":"df248e63.c0ddf","type":"debug","z":"c0ddb509.b04f48","name":"DATE","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":730,"y":2820,"wires":[]},{"id":"f88512.13234af","type":"change","z":"c0ddb509.b04f48","name":"","rules":[{"t":"set","p":"minimumDate","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":2740,"wires":[[]]},{"id":"93fae10c.09faa","type":"ui_group","name":"Default","tab":"6ff5405c.a8e6","order":1,"disp":true,"width":"6","collapse":false},{"id":"6ff5405c.a8e6","type":"ui_tab","name":"TEST","icon":"dashboard","order":3,"disabled":false,"hidden":false}]

thx a lot, i forgot to add that im looking for a form option preferably, if there isnt ill update the flow to use your solution

I cant see any ways to do it with form.

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