0
votes

How can i get a count down timer to run when two dates are selected.

eg.

I have 2 page items

  • :p5_start_date and

  • :p5_end_date

when the both dates are selected i want a real time count down until the end date.

I have already tried a plugin but its not able to set the date fields.

1

1 Answers

1
votes

Use JavaScript. You can create a query that return the two items value and all you should do is iterate from start date but in my opinion it can be handled from front-end...I don't know if it is an 'HH:MM' format or 'YYYY-MM-DD'...etc. With jQuery you can get values from items like example: $v( "p5_start_date" ) or apex.item( "p5_end_date" ).getValue(). I recommend to check out jQuery countdown plugins like: https://harshen.github.io/jquery-countdownTimer/ or something similar with jQuery.