diff --git a/src/usr/local/www/firewall_schedule_edit.php b/src/usr/local/www/firewall_schedule_edit.php
index 190a1d0d2f..31238d08dc 100644
--- a/src/usr/local/www/firewall_schedule_edit.php
+++ b/src/usr/local/www/firewall_schedule_edit.php
@@ -286,8 +286,8 @@ function build_date_table() {
$mostr .= '" class="col-md-6">';
$mostr .=
- '
- | ' . date("F_Y", mktime(0, 0, 0, date($monthcounter), 1, date($yearcounter))) . ' |
+ '
+ | ' . date("F_Y", mktime(0, 0, 0, date($monthcounter), 1, date($yearcounter))) . ' |
| ' . gettext("Mon") . ' |
@@ -325,7 +325,14 @@ function build_date_table() {
$mostr .= ' | ';
}
- if ($positioncounter == 7 || $daycounter > $numberofdays) {
+ if ($daycounter > $numberofdays) {
+ while ($positioncounter < 7) {
+ $mostr .= ' | ';
+ $positioncounter++;
+ }
+ }
+
+ if ($positioncounter == 7) {
$positioncounter = 1;
$mostr .= "
";
} else {