Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

131
Views
add prev or next date button in js
window.onload = function () {
    let today = new Date();
    let D = String(today.getDate()).padStart(2, '0');
    let M = String(today.getMonth() + 1).padStart(2, '0'); //January is 0!
    let YYYY = today.getFullYear();
    today = YYYY + '-' + M + '-' + D;

    let today2 = new Date();
    today2 = M + "/" + D + "/" + YYYY;

    var prevday = new Date();
    prevday.setDate(prevday.getDate() - 1);

    var nextday = new Date();
    nextday.setDate(nextday.getDate() + 1);
    addRow(
        '<tr><td colspan="2"><h3>Events for <a href="?date=<?=$prev_date;?>">Previous</a>'
        +  '&nbsp;&nbsp;&nbsp;&nbsp; '  + today2 + '&nbsp;&nbsp;&nbsp;&nbsp; '
        + '<a href="?date=<?=$next_date;?>">Next</a></h3></td></tr>');
}

The code above to update the datepicker display date with previous and next date? I tried in PHP and JS and I did not have success on both.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!