diff --git a/app/models/p_hire.rb b/app/models/p_hire.rb index c05f490..f321833 100644 --- a/app/models/p_hire.rb +++ b/app/models/p_hire.rb @@ -141,7 +141,9 @@ class PHire startt = DateTime.parse(@start_date.strftime("%Y-%m-%d " + unavailable_start_time + Time.zone.to_s)) endt = DateTime.parse(@end_date.strftime("%Y-%m-%d " + unavailable_end_time + Time.zone.to_s)) if !((startt..endt) & (@start_date..@end_date)).blank? - break if (@start_date + interval) > new_end_date + @start_date += interval + @end_date += interval + datet += interval if datet next end end