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>' + ' ' + today2 + ' ' + '<a href="?date=<?=$next_date;?>">Next</a></h3></td></tr>'); }¿El código anterior para actualizar la fecha de visualización del selector de fecha con la fecha anterior y la siguiente? Probé en PHP y JS y no tuve éxito en ambos.