Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6596495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:05:00+00:00 2026-05-25T18:05:00+00:00

This should be a simple fix; I currently have a calendar for selecting a

  • 0

This should be a simple fix;

I currently have a calendar for selecting a range of date:

http://protekco.com/index.php/en/reservations/1718-carvelle-drive-westpalm-beach.html

When the dates are selected in the calendar, it populates 2 input fields for Check in and Check out dates. The problem is, the calendar initially was set 1 day late, so Thursday Sept 22 actually showed as a Thursday Sept 21. I was able to just echo a +1 on the day count, but the input boxes still show the erroneous date. Essentially, I’m trying to add the same +1, but because the date is returned as yyyy/mm/dd, +1 doesn’t do much.
Here is the code:

$listsFrom = $this->lists['from'];
$selectedFrom = $listsFrom ? strtotime($listsFrom) : 0;

$listsTo = $this->lists['to'];
$selectedTo = $listsTo ? strtotime($listsTo) : $selectedFrom;

if ($selectedTo) {
    ADocument::addDomreadyEvent('Calendars.checkOut = ' . $selectedTo . ';');
}
if ($selectedFrom) {
    ADocument::addDomreadyEvent('Calendars.checkIn = ' . $selectedFrom . ';');
}

$listOperation = $this->lists['operation'];

ADocument::addDomreadyEvent('Calendars.operation = ' . $listOperation . ';');

Any ideas?

Thank you!

Edit:

<td class="<?php echo implode(' ', $class); ?>" <?php if ($canReserveBox) { ?> id="day<?php echo $firstDay->Uts+84600000; ?>" onclick="Calendars.setCheckDate('day<?php echo $firstDay->Uts+84600000; ?>','<?php echo AHtml::getDateFormat($firstDay->date, ADATE_FORMAT_MYSQL_DATE, 0); ?>','<?php echo AHtml::getDateFormat($firstDay->date, ADATE_FORMAT_NORMAL); ?>')"<?php } ?> >
                <span class="date" >
                    <?php echo AHtml::getDateFormat($firstDay->date, ADATE_FORMAT_NICE_SHORT)+1; 
                    ?>
                </span>

This is what actually calls the changes. The + 84600000 is my addition, it doesn’t seem to do much tho.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:05:01+00:00Added an answer on May 25, 2026 at 6:05 pm

    If the date is in yyyy/mm/dd format, first use strtotime() to convert it to a timestamp, and then you can use it again to add one day.

    $date = '2011/06/01';
    $ts   = strtotime('+24 hours', strtotime($date));
    $date = date('Y/m/d', $ts);
    

    That is just one possible solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This should be so simple, but I'm drawing a blank. I have two tables.
This should be simple enough, and I blame this primarily on my inexperience working
This should be simple, but the answer is eluding me. If I've got a
This should seem simple enough, but can't figure it out. I was porting a
I know this should be simple and I should know it but it's eluding
Seems like this should be simple, but powershell is winning another battle with me.
I think this should be simple but I am having some difficulty implementing it.
This should be a simple question, but I haven't been able to find a
This should be a simple question, but I just can't recall the relevant API.
This should be painfully simple, but I cannot come up with a working connection

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.