Open barodiamansi opened 8 years ago
See https://github.com/Shopify/dashing/issues/231 for the solution.
so edit the below section in dashing.coffee to something like:
if updatedAt = @get('updatedAt')
timestamp = new Date(updatedAt * 1000)
year = timestamp.getFullYear()
month = timestamp.getMonth()
day = timestamp.getDate()
hours = timestamp.getHours()
minutes = ("0" + timestamp.getMinutes()).slice(-2)
"Last updated at #{day}/#{month+1}/#{year} #{hours}:#{minutes}"`
There is 'Last update at' text at the bottom of every widget which shows the time of when the dashboard was last updated. I would like to show the date as well along with time. I have
<p class="updated-at" data-bind="updatedAtMessage"></p>
in my html file and I tried setting "updatedAtMessage" along with the data I pass to send_event, but didn't had much luck with it.Sample example:
I think one other workaround could be to override the method which displays 'Last updated at' in the widgets I have. But I am using multiple widgets and will have to override in every single widget. I would appreciate if there is an option in the main Dashing widget to display date along with time.