From 46cb8589f80162d632e4ccd465ee6cf25625fae2 Mon Sep 17 00:00:00 2001 From: Carsten Otto Date: Fri, 22 May 2015 21:07:59 +0200 Subject: [PATCH] Ignore time, so that one can always defer to the due date Fix #1878 --- app/helpers/todos_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index 1c99fc9b..fe58e211 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -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