mirror of
https://github.com/pierre42100/ComunicWeb
synced 2025-06-19 04:15:17 +00:00
Added countdown timer
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user