# How can I send month with template node

**URL:** <https://discourse.nodered.org/t/how-can-i-send-month-with-template-node/88181>\
**Category:** Dashboard\
**Tags:** dashboard-2, ui-template\
**Created:** [23 May 2024 03:55 UTC](https://discourse.nodered.org/t/how-can-i-send-month-with-template-node/88181 "2024-05-23T03:55:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![2shlee](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/2shlee/32/89413_2.png) [@2shlee](https://discourse.nodered.org/u/2shlee)\
**Post date:** [23 May 2024 03:55 UTC](https://discourse.nodered.org/t/how-can-i-send-month-with-template-node/88181/1 "2024-05-23T03:55:52Z")

</div>

In dashboard 2.0, a month-picker was created in template node via vue.js. At this time, I try to transfer the selected month(clicked) to the next node in msg, but the value is not delivered.

```auto
[
    {
        "id": "bc1421233050ca07",
        "type": "ui-template",
        "z": "53c7c787661b774e",
        "group": "e7f9652ed7551a4e",
        "page": "",
        "ui": "",
        "name": "",
        "order": 1,
        "width": "3",
        "height": "3",
        "head": "",
        "format": "<template>\n <v-row justify=\"center\">\n <v-date-picker\n v-model=\"date\"\n type=\"month\"\n class=\"mt-4\"\n min=\"2000-01\"\n max=\"2099-12\"\n @change=\"sendDate\"\n ></v-date-picker>\n </v-row>\n</template>\n\n<script>\nexport default {\n data() {\n return {\n date: '2024-01',\n }\n },\n methods: {\n sendDate(value) {\n const year = value.substring(0, 4);\n const month = value.substring(5, 7);\n this.msg.payload = { year: year, month: month };\n\n // Include the year and month in the message payload\n this.$socket.emit('message', {\n _client: {\n socketId: this.$socket.id,\n },\n payload: this.msg.payload,\n });\n },\n },\n}\n</script>\n",
        "storeOutMessages": true,
        "passthru": true,
        "resendOnRefresh": true,
        "templateScope": "local",
        "className": "",
        "x": 800,
        "y": 960,
        "wires": [
            [
                "601613d1bf7105f6"
            ]
        ]
    },
    {
        "id": "601613d1bf7105f6",
        "type": "debug",
        "z": "53c7c787661b774e",
        "name": "debug 182",
        "active": true,
        "tosidebar": true,
        "console": true,
        "tostatus": true,
        "complete": "true",
        "targetType": "full",
        "statusVal": "payload",
        "statusType": "auto",
        "x": 1010,
        "y": 960,
        "wires": []
    },
    {
        "id": "e7f9652ed7551a4e",
        "type": "ui-group",
        "name": "Day",
        "page": "062c796f176df548",
        "width": "10",
        "height": "1",
        "order": 9,
        "showTitle": false,
        "className": "monitoring",
        "visible": "true",
        "disabled": "false"
    },
    {
        "id": "062c796f176df548",
        "type": "ui-page",
        "name": "Dashboard",
        "ui": "e20d369367cae77f",
        "path": "/pageN",
        "icon": "home",
        "layout": "grid",
        "theme": "42bb5152f64cd1e0",
        "order": -1,
        "className": "",
        "visible": "true",
        "disabled": "false"
    },
    {
        "id": "e20d369367cae77f",
        "type": "ui-base",
        "name": "My Dashboard",
        "path": "/dashboard",
        "includeClientData": true,
        "acceptsClientConfig": [
            "ui-notification",
            "ui-control"
        ],
        "showPathInSidebar": false,
        "navigationStyle": "default"
    },
    {
        "id": "42bb5152f64cd1e0",
        "type": "ui-theme",
        "name": "NJ",
        "colors": {
            "surface": "#ffffff",
            "primary": "#393e46",
            "bgPage": "#eeeeee",
            "groupBg": "#ffffff",
            "groupOutline": "#cccccc"
        },
        "sizes": {
            "pagePadding": "8px",
            "groupGap": "8px",
            "groupBorderRadius": "4px",
            "widgetGap": "4px"
        }
    }
]

```

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/c/fce64329b41900aa43c57e484a8917977c84f66e.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/2/d2c630d5c0d0fb342688595982df8ba68a063213.png)

---

<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:** [23 May 2024 06:24 UTC](https://discourse.nodered.org/t/how-can-i-send-month-with-template-node/88181/2 "2024-05-23T06:24:27Z")

</div>

Your flow cannot be copied.  
please see the guide on how to post the code in the forum.

> [@How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506):
>
> To share code samples or flow json in this forum, you need to take care to format it properly so that it is displayed correctly. The easiest way to do that is to click the 'Preformatted Text' button in the toolbar: [image] Then paste in your code or flow json. You should end up with three back-tick characters - ``` - on their own line before and after the code. On standard US English keyboards, this is on the same key as the ~ character. Using the backticks will ens…

---

<div class="post-metadata">

**Author:** ![2shlee](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/2shlee/32/89413_2.png) [@2shlee](https://discourse.nodered.org/u/2shlee)\
**Post date:** [23 May 2024 06:27 UTC](https://discourse.nodered.org/t/how-can-i-send-month-with-template-node/88181/3 "2024-05-23T06:27:14Z")

</div>

I'm sorry. I corrected it.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [23 May 2024 08:21 UTC](https://discourse.nodered.org/t/how-can-i-send-month-with-template-node/88181/4 "2024-05-23T08:21:30Z")

</div>

Add `console.log()` debug output at various points in your flow to see what is happening. The output will appear in the browser developer console showing the dashboard page.

---

<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:** [22 June 2024 08:22 UTC](https://discourse.nodered.org/t/how-can-i-send-month-with-template-node/88181/5 "2024-06-22T08:22:17Z")

</div>

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