I'm trying to preload the Time field of a node red dashboard ui form using the incoming msg
, like so:
[{"id":"c1dce9ca4b3f9013","type":"ui_form","z":"30c224646f95e02b","name":"Date form","label":"","group":"903a6ab8.4f4ca8","order":1,"width":0,"height":0,"options":[{"label":"formDate","value":"formDate","type":"date","required":false,"rows":null},{"label":"formTime","value":"formTime","type":"time","required":false,"rows":null}],"formValue":{"formDate":"","formTime":""},"payload":"","submit":"submit","cancel":"cancel","topic":"","topicType":"str","splitLayout":false,"x":1180,"y":1160,"wires":[["c3abdd59a3dcf461"]]},{"id":"ffbc742075c7aa70","type":"function","z":"30c224646f95e02b","name":"Date & Time","func":"msg.payload = {\n formDate: \"2021-08-10T19:24:42.854Z\",\n formTime: \"1970-01-01T20:26:00.000Z\"\n }\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":975,"y":1160,"wires":[["c1dce9ca4b3f9013","48e7b13e046a3fbc"]]},{"id":"3287732f7dd33cd2","type":"inject","z":"30c224646f95e02b","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":800,"y":1160,"wires":[["ffbc742075c7aa70"]]},{"id":"48e7b13e046a3fbc","type":"debug","z":"30c224646f95e02b","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1190,"y":1200,"wires":[]},{"id":"c3abdd59a3dcf461","type":"debug","z":"30c224646f95e02b","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1350,"y":1160,"wires":[]},{"id":"903a6ab8.4f4ca8","type":"ui_group","name":"Home","tab":"e2e6f4f5.56f91","order":1,"disp":false,"width":"6","collapse":false},{"id":"e2e6f4f5.56f91","type":"ui_tab","name":"Home","icon":"dashboard","order":1,"disabled":false,"hidden":false}]
What I'm feeding into the form is the exact output of itshelf, when submiting new values, for example:
msg.payload = {
formDate: "2021-08-10T19:24:42.854Z", // Works
formTime: "1970-01-01T20:26:00.000Z" // Does not work
}
return msg;
The date field initializes, but the time field does not.
Am I missing something? Thanks!
Node-RED version: v2.0.5
Node.js version: v10.24.1
Linux 5.10.52-v7l+ arm LE
Dashboard version 2.30.0 started at /ui