Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/inputs/date_time_picker_input.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def formatted_input_value

if v.is_a?(Time)
return DateTime.new(v.year, v.month, v.day, v.hour, v.min, v.sec).strftime(
ActiveadminAddons.datetime_picker_input_format
options[:input_format] || ActiveadminAddons.datetime_picker_input_format
)
end

Expand Down
2 changes: 2 additions & 0 deletions docs/date-time-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ form do |f|
f.actions
```

You can also pass `input_format` to set DateTimePickerInput input format that should be expected from the backend. This option also be set globally in the options below.

## Overriding defaults

You can modify, in the gem's setup block, the default options like this:
Expand Down