Need to display current_date and time on Text Widget
I am using Text Widget in my dashboard to display the dashboard header content. In the same widget i want to display current date and time. The Date and Time stamp is location specific. If the dashboard is accessed by different user from different time zones, the current date and time should display as per user's time zone. Could any one help me how i can implement.
-
You'll have to add a widget script to the text widget that pulls in the current date and time via javascript
Something like
var today = new Date();var date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate() + today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
Please sign in to leave a comment.
Comments
3 comments