Forum


Calc Builder Support

Calc Builder support
Forums
No se permite escribir sin estar logado. Por favor, login

Inline Day Calculator 08.02.2016 16:54

I have made with your help a custom count # of days calendar. The results show up inline.

However whenever I choose the startdate the enddate is automatically choosing todays date even though it does not show up in the end date date picker. How can I prevent the end date from automatically assigning the todays date value before a end date is chosen. I have set the default to 0

Re: Inline Day Calculator 08.02.2016 17:23

Hi,
if the field is empty, the date creation you use for calculate creates a 'today' date by default. What you need now is to set the result to 0 if any of the fields is not present, right?. Then you need an 'if/else' structure: Given startdate and enddate...

//if any of the date fields is empty
if($startdate==""||$enddate==""){

//set the result to 0
$days=0;
}
else{

//copy here your days calculation you had before
}



Hope this helps, regards
Moonsoft Team
www.moonsoft.es

Re: Inline Day Calculator 08.02.2016 18:48

ok Thanks. So i need to use that if statement for each of the 5 fields correct?

Re: Inline Day Calculator 08.02.2016 18:57

Awesome thanks so much. The support for your product is OUTSTANDING!!!!!!

Re: Inline Day Calculator 08.02.2016 19:07

Hi,
great, thank you, we appreciate the feedback.

Regards
Moonsoft Team
www.moonsoft.es
Are you satisfied with our products/services/support?
Please help us to keep improving, add a review at  joomla extensions site and  magento connect

Lo que nuestros clientes opinan de nosotros