You could store delay in context storage using text input.
Then when button pressed retrieve the delay.
e.g.
[{"id":"de5a53de.c6563","type":"ui_button","z":"9b3f9f31.c45298","name":"","group":"8b5cde76.edd58","order":5,"width":0,"height":0,"passthru":true,"label":"button","tooltip":"","color":"","bgcolor":"","icon":"","payload":"button payload","payloadType":"str","topic":"topic","topicType":"msg","x":160,"y":880,"wires":[["2239319d.300b26"]]},{"id":"2239319d.300b26","type":"change","z":"9b3f9f31.c45298","name":"","rules":[{"t":"set","p":"delay","pt":"msg","to":"delay","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":880,"wires":[["8fefddb9.516378"]]},{"id":"c2399d5.1150ce","type":"inject","z":"9b3f9f31.c45298","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":90,"y":940,"wires":[["de5a53de.c6563"]]},{"id":"8fefddb9.516378","type":"trigger","z":"9b3f9f31.c45298","name":"","op1":"start","op2":"","op1type":"str","op2type":"pay","duration":"250","extend":false,"overrideDelay":true,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":560,"y":880,"wires":[["7ed0502.67c00b"]]},{"id":"7ed0502.67c00b","type":"debug","z":"9b3f9f31.c45298","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":670,"y":920,"wires":[]},{"id":"f770cf93.e42a6","type":"ui_text_input","z":"9b3f9f31.c45298","name":"","label":"","tooltip":"","group":"8b5cde76.edd58","order":4,"width":0,"height":0,"passthru":true,"mode":"number","delay":"0","topic":"topic","topicType":"msg","x":170,"y":820,"wires":[["ee96b444.32b43"]]},{"id":"c7e6c8f5.e315f","type":"inject","z":"9b3f9f31.c45298","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"3000","payloadType":"num","x":50,"y":780,"wires":[["f770cf93.e42a6"]]},{"id":"ee96b444.32b43","type":"change","z":"9b3f9f31.c45298","name":"","rules":[{"t":"set","p":"delay","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":820,"wires":[[]]},{"id":"8b5cde76.edd58","type":"ui_group","name":"","tab":"8f03e639.85956","order":1,"disp":true,"width":"6","collapse":false},{"id":"8f03e639.85956","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]
The injects are just for testing.