Skip to content

Commit 0726348

Browse files
committed
Merge pull request #10 from swrobel/patch-1
Include seconds in input_value
2 parents 2110894 + 084df8a commit 0726348

File tree

1 file changed

+1
-1
lines changed
  • lib/active_admin_datetimepicker

1 file changed

+1
-1
lines changed

lib/active_admin_datetimepicker/base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def input_html_options(input_name = nil)
2828

2929
def input_value(input_name = nil)
3030
val = object.public_send(input_name || method)
31-
return DateTime.new(val.year, val.month, val.day, val.hour, val.min).strftime(format) if val.is_a?(Time)
31+
return DateTime.new(val.year, val.month, val.day, val.hour, val.min, val.sec).strftime(format) if val.is_a?(Time)
3232
val.to_s
3333
end
3434

0 commit comments

Comments
 (0)