Skip to content

active_admin_datetimepicker submitted value attributes bug in commit e522459 #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Cusp2356 opened this issue Jun 20, 2019 · 2 comments · Fixed by #55
Closed

active_admin_datetimepicker submitted value attributes bug in commit e522459 #54

Cusp2356 opened this issue Jun 20, 2019 · 2 comments · Fixed by #55
Assignees
Labels

Comments

@Cusp2356
Copy link

Commit e522459 - improve_input_html_options (#53), breaks datetimepicker functionality when an ActiveAdmin form is submitted. Hours and minutes are cut off the submitted value attributes, and the lteq value attribute is overwritten with the submitted gteq value attribute.

Cusp2356 referenced this issue in workgena/active_admin_datetimepicker Jun 20, 2019
[refs activeadmin-plugins#52]

@mantoszew found the bug with range-input:

- From/To placeholder are missing

This commit aims to fix it.
And also add support of other `input_html` options.

For example:

```ruby
form do |f|
  f.input :created_at, as: :date_time_picker, input_html: { placeholder: 'Text here...' }
end
```
@workgena workgena self-assigned this Jun 21, 2019
@workgena workgena added the bug label Jun 21, 2019
@workgena
Copy link
Contributor

workgena commented Jun 21, 2019

The bug is reproduce-able even on earlier version. Working on a hotfix.

workgena added a commit to workgena/active_admin_datetimepicker that referenced this issue Jun 21, 2019
[fixes activeadmin-plugins#54]

Add test after form submission
@workgena
Copy link
Contributor

Version 0.7.2 released to the RubyGems. It should fix the issue.

Please notice that H:M works correctly only if column in database is t.datetime or t.timestamp(s)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants