Fix display recurring events bug.
This commit is contained in:
parent
c4ef2557a3
commit
b4aa1d125b
|
@ -136,7 +136,10 @@ class PHire
|
|||
if unavailable && (unavailable_start_date <= @start_date) && (unavailable_end_date >= @end_date) && !((@start_date.strftime("%w").to_i .. @end_date.strftime("%w").to_i).to_a & unavailable_weekdays).empty?
|
||||
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))
|
||||
next if !((startt..endt) & (@start_date..@end_date)).blank?
|
||||
if !((startt..endt) & (@start_date..@end_date)).blank?
|
||||
break if (@start_date + interval) > new_end_date
|
||||
next
|
||||
end
|
||||
end
|
||||
if @start_date >= start_date
|
||||
@recurring << re.as_json({:startt=>@start_date,:endt=>@end_date,:datet=>datet})
|
||||
|
|
Loading…
Reference in New Issue