Count down

1
Hi I am developing an event functionality, and i am using the count down widget to display the time remaining before the start of the event. I have an entity(event) with an attribute(start date) which i want to use with the Widget to display the days, hours, minutes and seconds left before the event starts. I also want to display the time elapsed for that event using the same entity and attribute. Is it possible to trigger the widget using a button?? Please assist.
asked
3 answers
1

Hi Ndikhaye,

What you can try is set a Date1 variable when the event starts to [%CurrentDateTime%] and then on some kind of event or action during the event, again set a new variable Date2 to the [%CurrentDateTime%] and then display the hours/minutes/seconds between.

Obviously this would be an odd workaround, performance-wise not great. Also you probably wouldn't be able to show the 'time elapsed' at regular intervals.

I'm sure one of the geniuses on here will have a cleaner answer for you in no time.

answered
0

The Count Down widget should do exactly what you want for the first requirement - simply place it in your data view and select the date/time attribute to use in the Time Attribute property. You don't need to trigger it with a button - it will display the countdown, and if you have the Auto-update property set to yes, it will give a continuously updated display.

For you elapsed time display, I think you need to put in an enhancement request in the Support site. The code seems to assume the date will always be in the future, so the auto-update option always subtracts a second, but if the date is in the past then the code needs changing to add a second instead.

answered
0

The Count Down widget should do exactly what you want for the first requirement - simply place it in your data view and select the date/time attribute to use in the Time Attribute property. You don't need to trigger it with a button - it will display the countdown, and if you have the Auto-update property set to yes, it will give a continuously updated display.

If instead of the date being in the future, it is in the past, the widget will display the elapsed time since the start date, which again is what you want. What problem are you having?

answered