Fix errors for first of month.
All checks were successful
Build power-consumtion image / Build-and-release-image (push) Successful in 1m19s
All checks were successful
Build power-consumtion image / Build-and-release-image (push) Successful in 1m19s
This commit is contained in:
@@ -42,12 +42,14 @@ $chosen_date_time = new DateTime($chosen_date);
|
||||
<body>
|
||||
<form id="date_form" style="align-self: center; width: 500px; display: grid; grid-template-columns: 20% 20% 20% 20% 20%; gap: 10px;" action="/index.php" method="post">
|
||||
<?php
|
||||
$chosen_date_time->modify('-1 month');
|
||||
if ($dates['first'] < $chosen_date_time) {
|
||||
echo "<button type='button' onclick='submit_form(\"" . $chosen_date_time->modify('-1 month')->format('Y-m') . "\")'><</button>";
|
||||
echo "<button type='button' onclick='submit_form(\"" . $chosen_date_time->format('Y-m') . "\")'><</button>";
|
||||
} else {
|
||||
echo '<span></span>';
|
||||
}
|
||||
echo '<span style="text-align: center">' . $chosen_date_time->modify('+1 month')->format('Y-m') . '</span>';
|
||||
$chosen_date_time->modify('+1 month');
|
||||
echo '<span style="text-align: center">' . $chosen_date_time->format('Y-m') . '</span>';
|
||||
if ($dates['last'] > $chosen_date_time->modify('+1 month')) {
|
||||
echo "<button type='button' onclick='submit_form(\"" . $chosen_date_time->format('Y-m') . "\")'>></button>";
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user