OK @Marzio,
I think I got your problem...
The counter-up (1,2,3,4...) is easy, I showed it to you.
But I had problem doinf the counter-down (5,4,3,2...)
I think I got it by running through some posts in here
Please add the following to your code and check if it is correct:
- add before your repeat list (outside), 2 DateTime components (1 local time, 1 UTC time) and 1 Variable holding the offset
<dmx-datetime id="var_DateTime"></dmx-datetime>
<dmx-datetime id="var_UTCDateTime" utc="true"></dmx-datetime>
<dmx-value id="var_offset" dmx-bind:value="var_DateTime.datetime.secondsUntil(var_UTCDateTime.datetime.split('Z')[0])"></dmx-value>
- Then in your repeat table add the counterdown (just a table
<td>
)
<td dmx-text="(((var_DateTime.datetime.secondsUntil(prh_StartedAt.addSeconds(-var_offset.value+300))/60)%60).floor()+'m'+(var_DateTime.datetime.secondsUntil(prh_StartedAt.addSeconds(-var_offset.value+300))%60).floor()+'s')" class="text-center"></td>
So add the above or replace a column (td) you have in your repeat table ans check the result.
*When you paste the above code, REPLACE prh_StartedAt
with the datetime field from your query
**This counterdown doesn't stop at 0m0s... Neither disables/remove the button so the user can purchase the specific item when counterdown is less tha zero (time ended...).
You have to take care of these actions