Ignore time, so that one can always defer to the due date

Fix #1878
This commit is contained in:
Carsten Otto 2015-05-22 21:07:59 +02:00
parent 660238d2cf
commit 46cb8589f8

View file

@ -179,7 +179,7 @@ module TodosHelper
options = {:x_defer_alert => false, :class => "icon_defer_item icon_defer_#{days}_item", :id => "defer_#{days}_#{dom_id(todo)}" }
if todo.due
futuredate = (todo.show_from || todo.user.date) + days.days
if futuredate > todo.due
if futuredate.at_midnight > todo.due.at_midnight
options[:x_defer_alert] = true
options[:x_defer_date_after_due_date] = t('todos.defer_date_after_due_date')
end