You can embed javascript in the Text Widget. Add Text Widget > Source button and enter in something like this:
<p id="today">[today]</p>
<script>
var d = new Date();
var date = d.getFullYear() + "/" + d.getMonth() + "/" + d.getDate()
document.getElementById('today').innerHTML = date;
</script>
Note that the javascript needs to be after the html code it modifies. I don't think you can use this javascript to modify other parts of the dashboard or extract data from monitoring because it's all contained inside an iframe. I also don't know if this will continue to work in the future.
If you need to get monitoring data into the widget, you might want to look at the various examples of datasources that directly modify widgets on these forums like: a href="https://communities.logicmonitor.com/topic/2173-sql-results-table-display/#comment-5571" rel="">https://communities.logicmonitor.com/topic/2173-sql-results-table-display/#comment-5571