Countdown Card for Dashboards, Sites, Hub

03-11-2020 10:14 AM
Status: Already Offered
Occasional Contributor III

I'd like to see an option to add a card (or indicator in Dashboard) that will count down the days until a deadline. The user would specify the deadline and the card/indicator would subtract that date from today's date and return the total number of days left. Once you get to the deadline, the counter stays at zero.

The use case for me is that I'd like to have countdowns to A) the deadline to register to vote and B) the date of the next election to go with some of our elections apps.

1 Comment
Status changed to: Already Offered


This should be possible using a data expression as the data source for an indicator. Something as simple as the following might work. 



var v = Floor(DateDiff(Date(2021,12,31), Date(), "days"))
var s = {
        "features":[{ "attributes":{"VALUE_":v }}]}
return FeatureSet(Text(s))