Fixed issue in month determination

This commit is contained in:
Pierre 2018-01-07 18:44:49 +01:00
parent e757900094
commit 374ccf52f1

View File

@ -411,7 +411,7 @@ ComunicWeb.components.posts.form = {
//Convert the end time to a timestamp //Convert the end time to a timestamp
var end_date = new Date(); var end_date = new Date();
end_date.setDate(end_date_array[0]); end_date.setDate(end_date_array[0]);
end_date.setMonth(end_date_array[1]); end_date.setMonth(end_date_array[1] - 1); //January => 0 / December => 11
end_date.setFullYear(end_date_array[2]); end_date.setFullYear(end_date_array[2]);
var time_end = Math.floor(end_date.getTime()/1000); var time_end = Math.floor(end_date.getTime()/1000);