Time/Date on the Dashboard

With this you get the time in the upper right corner, should be easy to adapt to also show date.

Not mine code, found it here some where and using it, works great.

[{"id":"c776d5dc.13cb9","type":"ui_template","z":"fdbd545f.293558","group":"cbd3ecb4.7a42c8","name":"Clock Toolbar","order":4,"width":"0","height":"0","format":"<script id=\"titleScript\" type=\"text/javascript\">\n    $('#clock').remove();\n    var toolbar = $('.md-toolbar-tools');\n    var div = $('<div/>');\n    var p = $('<p/ id=\"clock\">');\n    \n    $('#titleScript').parent().hide();\n    div.append(p);\n    div[0].style.margin = '5px 5px 5px auto';\n    toolbar.append(div);\n\n    function displayTitle(lh) {\n        p.text(lh); \n    }\n    \n    function upTime() {\n        var d = new Date();\n        p.text(d.toLocaleTimeString('de-AT'));\n    }\n\n    \n\n    // Watch the payload and update the title\n    (function(scope) {\n        scope.$watch('msg.payload', function(data) {\n            displayTitle(data);\n        });\n        setInterval(upTime,1000);\n    })(scope);\n</script>","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":680,"y":40,"wires":[[]]},{"id":"cbd3ecb4.7a42c8","type":"ui_group","z":"","name":"Temperatuur Node","tab":"a3d9e83f.d70da","order":1,"disp":true,"width":"12"},{"id":"a3d9e83f.d70da","type":"ui_tab","z":"","name":"Hal","icon":"dashboard","order":11}]
4 Likes