Skip to content
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

Implement the DatetimePickerInput of formtastic 2.2.1 #1522

Closed
PaulKlumpp opened this issue Jul 17, 2012 · 7 comments
Closed

Implement the DatetimePickerInput of formtastic 2.2.1 #1522

PaulKlumpp opened this issue Jul 17, 2012 · 7 comments

Comments

@PaulKlumpp
Copy link

Formtastic 2.2.1 generates the base to have a calendar style Date and Time picker.
Currently, activeadmin 0.4.4, uses formtastic 2.1.1, which only provides a Date picker.

Please CSS-gurus over at activeadmin, implement a DateTime picker as well! :)

http://rubydoc.info/gems/formtastic/Formtastic/Inputs/DatetimePickerInput

@jpmckinney
Copy link
Contributor

If you update ActiveAdmin: gem 'activeadmin', :git => 'git://github.com/gregbell/active_admin.git', then you can use Formtastic 2.2.1, in which case you can probably just use f.input :my_attribute, :as => datepicker no?

@PaulKlumpp
Copy link
Author

As said, :as => :datepicker works great with formtastic 2.1.1 and activeadmin 0.4.4 that is not from git.

The feature request is about a :as => :datetimepicker that formtastic 2.2.1 would provide - but activeadmin does not use it yet.
To be sure, I tested activeadmin from git and formtastic 2.2.1 - but :as => :datepicker does not support time selection.

@jpmckinney
Copy link
Contributor

Ah, I see, the necessary JS and CSS is missing.

@shalvika
Copy link

Is there an update on this? Facing the same issue, needing a good fix, infact I want to be able to use the 'datepicker' on a form_tag !!!

@inscapist
Copy link

Hi james, do you know which css and js files are needed? thanks in advance

@seanlinsley
Copy link
Contributor

Formtastic just builds the HTML5 markup for this, but just about all browsers today don't have acceptable support for this. Unless someone wants to suggest a JS alternative, this feature is going to have to wait.

@shekibobo
Copy link
Contributor

If you're looking to have more user-friendly inputs for datetime attributes, TimeSplitter lets you easily split datetime fields into datepicker and time inputs. I adapted this gem from SplitDatetime, which was a bit buggy and was broken in Rails 4. I'm using SplitDatetime in a couple projects now, and it works great with AA.

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

No branches or pull requests

6 participants