Input type date format "dd-MM-yyyy"

I have an input type date

> <input type="date" ng-model="msg.payload.data1" id="date" name="Date" >

when i dispaly it in template mustache node, i get like this
date

i want to change the format of date. i have tried this code below but it doesn't work. it dispalays nothing.
{{payload.0.data1|date:'mediumDate'}

Can't you reformat it in a function node or use the contrib-moment node?

Sorry I did not know about the existence of that node. Thanks

<input type="date" ng-model="msg.payload.data1" id="date" name="Date" >
{{msg.payload.data1 | date:'mediumDate'}}

This code works for me as expected. You refered that by payload.0.data1 but there is no array in your example.

1 Like