Moonsoft Software Solutions

Inline Day Calculator

Started 8 Feb 2016 · 4 replies

  1. phil_adler
    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
  2. Moonsoft support
    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
  3. phil_adler
    ok Thanks. So i need to use that if statement for each of the 5 fields correct?
  4. phil_adler
    Awesome thanks so much. The support for your product is OUTSTANDING!!!!!!
  5. Moonsoft support
    Hi,
    great, thank you, we appreciate the feedback.

    Regards

Still stuck?

Customers with an active license can open a support ticket.

Log in to open a ticket