Added countdown timer

This commit is contained in:
Pierre
2018-01-03 13:38:06 +01:00
parent c01f081135
commit eb860a5c23
5 changed files with 66 additions and 7 deletions

View File

@ -236,14 +236,8 @@ ComunicWeb.components.posts.ui = {
class: "post-countdown"
});
//Set the date of the countdown time
var date = new Date();
date.setFullYear(infos.year_end);
date.setMonth(infos.month_end - 1); //Months starts from 0 (january) to 11 (december)
date.setDate(infos.day_end);
//Initialize countdown timer
ComunicWeb.components.countdown.init(date, target);
ComunicWeb.components.countdown.init(infos.time_end, target);
}
//If the kind of post was not implemented