For others having the same issue with the start and end poll dates being calculated incorrectly I’ve added 4 lines of code into the “Total-Soft-Poll-Widget.js” file to fix the issue. If you’d like to update the file yourselves here are the two updated functions that you would need to replace in the original file.
function Total_Soft_Poll_Upcoming(Poll_ID) {
var datereal=new Date(), currentMonth=datereal.getMonth() + 1, currentYear=datereal.getFullYear(),
currentDay=datereal.getDate();
var TotalSoft_Poll_Set_02=jQuery('#TotalSoft_Poll_Set_02_' + Poll_ID).val();
var thisDate = TotalSoft_Poll_Set_02.split('-'); //added by fwoit 12-01-2020 to fix the issue with the poll start date being calculated as one day behind the actual selected user date in the poll settings. Splits yyyy-mm-dd into its various parts
var TotalSoft_Poll_Set_02 = [thisDate[1],thisDate[2],thisDate[0] ].join("-"); //added by fwoit 12-01-2020 to fix the issue with the poll start date being calculated as one day behind the actual selected user date in the poll settings. Reorganizes date as mm-dd-yyyy
var datestart=new Date(TotalSoft_Poll_Set_02), startMonth=datestart.getMonth() + 1, startYear=datestart.getFullYear(),
startDay=datestart.getDate();
var Total_Soft_Poll_Upcoming_Bool=false;
if(currentYear < startYear) {
Total_Soft_Poll_Upcoming_Bool=true;
}
else if(currentYear==startYear) {
if(currentMonth < startMonth) {
Total_Soft_Poll_Upcoming_Bool=true;
}
else if(currentMonth==startMonth) {
if(currentDay < startDay) {
Total_Soft_Poll_Upcoming_Bool=true;
}
}
}
if(Total_Soft_Poll_Upcoming_Bool===true) {
jQuery('.TotalSoftPoll_Ans_ComingSoon_' + Poll_ID).css('display', 'block');
}
else {
jQuery('.TotalSoftPoll_Ans_ComingSoon_' + Poll_ID).css('display', 'none');
}
}
function Total_Soft_Poll_End_Poll(Poll_ID, Poll_Type) {
var datereal=new Date(), currentMonth=datereal.getMonth() + 1, currentYear=datereal.getFullYear(),
currentDay=datereal.getDate();
var TotalSoft_Poll_Set_03=jQuery('#TotalSoft_Poll_Set_03_' + Poll_ID).val();
var thisDate = TotalSoft_Poll_Set_03.split('-'); //added by fwoit 12-01-2020 to fix the issue with the poll end date being calculated as one day behind the actual selected user date in the poll settings. Splits yyyy-mm-dd into its various parts
var TotalSoft_Poll_Set_03 = [thisDate[1],thisDate[2],thisDate[0] ].join("-"); //added by fwoit 12-01-2020 to fix the issue with the poll end date being calculated as one day behind the actual selected user date in the poll settings. Reorganizes date as mm-dd-yyyy
var dateend=new Date(TotalSoft_Poll_Set_03), endMonth=dateend.getMonth() + 1, endYear=dateend.getFullYear(),
endDay=dateend.getDate();
var Total_Soft_Poll_End_Bool=false;
if(currentYear > endYear) {
Total_Soft_Poll_End_Bool=true;
}
else if(currentYear==endYear) {
if(currentMonth > endMonth) {
Total_Soft_Poll_End_Bool=true;
}
else if(currentMonth==endMonth) {
if(currentDay > endDay) {
Total_Soft_Poll_End_Bool=true;
}
}
}
if(Total_Soft_Poll_End_Bool===true) {
if(Poll_Type=='Standart') {
Total_Soft_Poll_Ans_Div1(Poll_ID);
}
else if(Poll_Type=='Image/Video') {
Total_Soft_Poll_Ans_DivIm1(Poll_ID);
}
else if(Poll_Type=='StandartWB') {
Total_Soft_Poll_Ans_DivSt1(Poll_ID);
}
else if(Poll_Type=='ImageWB/VideoWB') {
Total_Soft_Poll_Ans_DivIV1(Poll_ID);
}
else if(Poll_Type=='ImageIQ/VideoIQ') {
Total_Soft_Poll_Ans_DivSt1(Poll_ID);
}
}
}
I hope this helps others out there.