mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-26 18:02:21 +03:00
Corrected unavailable dates calculation for current day.
This commit is contained in:
parent
cb425e4221
commit
a47d03e616
1 changed files with 1 additions and 1 deletions
|
@ -506,7 +506,7 @@ class Appointments extends CI_Controller {
|
||||||
for ($i=1; $i<=$number_of_days; $i++) {
|
for ($i=1; $i<=$number_of_days; $i++) {
|
||||||
$current_date = new DateTime($selected_date->format('Y-m') . '-' . $i);
|
$current_date = new DateTime($selected_date->format('Y-m') . '-' . $i);
|
||||||
|
|
||||||
if ($current_date < new DateTime()) { // Past dates become immediatelly unavailable.
|
if ($current_date < new DateTime(date('Y-m-d 00:00:00'))) { // Past dates become immediatelly unavailable.
|
||||||
$unavailable_dates[] = $current_date->format('Y-m-d');
|
$unavailable_dates[] = $current_date->format('Y-m-d');
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue