# Issue with ui\_text\_input

**URL:** <https://discourse.nodered.org/t/issue-with-ui-text-input/63281>\
**Category:** Dashboard\
**Created:** [31 May 2022 07:21 UTC](https://discourse.nodered.org/t/issue-with-ui-text-input/63281 "2022-05-31T07:21:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aitor](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aitor/32/97363_2.png) [@aitor](https://discourse.nodered.org/u/aitor)\
**Post date:** [31 May 2022 07:21 UTC](https://discourse.nodered.org/t/issue-with-ui-text-input/63281/1 "2022-05-31T07:21:26Z")

</div>

Hello there,

I'm facing an issue with ui\_test\_input nodes. My goal is to set a default value for the dashboard user in these nodes.  
I configured the text\_input node as "datetime picker" so I inject a datetime value in msg.payload to set a default value to these nodes. What I observe using this procedure is:

1. The first time the node is initialized or everytime I enter to ui dashboard from a new tab in the explorer) I am not able to load the value to it:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/c/bc37ed048cde88dda70a362676e81196b25dbc4c.png)
2. Once I manually interact with the node (setting some values with the picker) I am able to set values through msg.payload  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/d/0d87bdbb3bcceafe967af18cbe437fd51e3ad072.png)

Does anyone know whether I am doing something wrong, or sould I report it as a bug?

Thanks

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [31 May 2022 08:32 UTC](https://discourse.nodered.org/t/issue-with-ui-text-input/63281/2 "2022-05-31T08:32:25Z")

</div>

First off there is no node (I can find) called `ui_test_input` so please provide the node’s full name like `node-red-contrib-????`

You also reference `text_input`. Have you two nodes or a typo?

A sample flow would also be useful along with the version of node-red, node.js and the dashboard. All of that information can be found in the node-red startup log.

---

<div class="post-metadata">

**Author:** ![aitor](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aitor/32/97363_2.png) [@aitor](https://discourse.nodered.org/u/aitor)\
**Post date:** [31 May 2022 14:47 UTC](https://discourse.nodered.org/t/issue-with-ui-text-input/63281/4 "2022-05-31T14:47:01Z")

</div>

Hello,

Info:  
The node is node-red-dashboard:3.1.7  
node-red: v2.1.3  
node.js v14.18.1

From node-red-dashboard the issue is in ui\_text\_input node (my misspelling \*\*ui\_test\_input).

I managed to find the solution:  
The documentation specifies: _Setting `msg.enabled` to `false` will disable the input_. So I assumed that by default this setting was true. After some tests, I found out that the node only updated its value with the one coming from msg.payload, if msg.enabled was also set to true or as I explained before if there was "manual" interaction with in the dashboard. So I just add msg.enabled = true to my msg and it works as I expected to.

However, is this procedure correct, or there may be some kind of bug? Maybe the browser? (Using Brave V1.39.111 with Chromium 102.0.5005.61)

I let the flow for anyone interested in testing it:

```auto
[
    {
        "id": "643cb57935159604",
        "type": "function",
        "z": "bc9b40b34320a510",
        "name": "Init Time",
        "func": "let date = new Date();\ndate.setHours(date.getHours() - 8);\n\nlet ms = Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), 0, 0);\n\nmsg = {};\nmsg.payload = ms;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 223,
        "y": 216,
        "wires": [
            [
                "08b2707952a338a2"
            ]
        ],
        "icon": "font-awesome/fa-chevron-right",
        "l": false
    },
    {
        "id": "0e9f7f3d5aa26f70",
        "type": "inject",
        "z": "bc9b40b34320a510",
        "name": "Refresh",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": "1",
        "topic": "",
        "payloadType": "date",
        "x": 167,
        "y": 216,
        "wires": [
            [
                "643cb57935159604"
            ]
        ],
        "icon": "font-awesome/fa-repeat",
        "l": false
    },
    {
        "id": "08b2707952a338a2",
        "type": "ui_text_input",
        "z": "bc9b40b34320a510",
        "name": "OEE VInit",
        "label": "From1",
        "tooltip": "",
        "group": "98898f35195ff9f0",
        "order": 3,
        "width": 4,
        "height": 1,
        "passthru": true,
        "mode": "datetime-local",
        "delay": 300,
        "topic": "topic",
        "sendOnBlur": true,
        "className": "",
        "topicType": "msg",
        "x": 316,
        "y": 216,
        "wires": [
            []
        ]
    },
    {
        "id": "5ee530df215731d3",
        "type": "comment",
        "z": "bc9b40b34320a510",
        "name": "With error",
        "info": "",
        "x": 196,
        "y": 176,
        "wires": []
    },
    {
        "id": "e708fa37676c0cb7",
        "type": "comment",
        "z": "bc9b40b34320a510",
        "name": "Corrected",
        "info": "",
        "x": 196,
        "y": 296,
        "wires": []
    },
    {
        "id": "7b537d3b2c689384",
        "type": "function",
        "z": "bc9b40b34320a510",
        "name": "Init Time",
        "func": "let date = new Date();\ndate.setHours(date.getHours() - 8);\n\nlet ms = Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), 0, 0);\n\nmsg = {};\nmsg.payload = ms;\nmsg.enabled = true;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 223,
        "y": 336,
        "wires": [
            [
                "cc38f9f9454ea41e"
            ]
        ],
        "icon": "font-awesome/fa-chevron-right",
        "l": false
    },
    {
        "id": "05cda47ef08dd342",
        "type": "inject",
        "z": "bc9b40b34320a510",
        "name": "Refresh",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": "1",
        "topic": "",
        "payloadType": "date",
        "x": 167,
        "y": 336,
        "wires": [
            [
                "7b537d3b2c689384"
            ]
        ],
        "icon": "font-awesome/fa-repeat",
        "l": false
    },
    {
        "id": "cc38f9f9454ea41e",
        "type": "ui_text_input",
        "z": "bc9b40b34320a510",
        "name": "OEE VInit",
        "label": "From2",
        "tooltip": "",
        "group": "98898f35195ff9f0",
        "order": 3,
        "width": 4,
        "height": 1,
        "passthru": true,
        "mode": "datetime-local",
        "delay": 300,
        "topic": "topic",
        "sendOnBlur": true,
        "className": "",
        "topicType": "msg",
        "x": 316,
        "y": 336,
        "wires": [
            []
        ]
    },
    {
        "id": "98898f35195ff9f0",
        "type": "ui_group",
        "name": "Test",
        "tab": "facc7602aab8ef87",
        "order": 1,
        "disp": true,
        "width": "24",
        "collapse": false,
        "className": ""
    },
    {
        "id": "facc7602aab8ef87",
        "type": "ui_tab",
        "name": "Home",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    }
]

```

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:** [14 June 2022 14:47 UTC](https://discourse.nodered.org/t/issue-with-ui-text-input/63281/5 "2022-06-14T14:47:06Z")

</div>

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