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

Making schedule_input Render a Date Picker and a Time Picker (Simple Form) #13

Open
taelton opened this issue Mar 17, 2016 · 1 comment

Comments

@taelton
Copy link

taelton commented Mar 17, 2016

I have date_picker_input.rb and time_picker_input.rb in app/inputs, and I'd like schedule_input.rb to use them, rather than having separate dropdowns for year, month, day, hour, and minute. It looks like I would need to modify schedule_input.rb on lines 45 & 79, but I'm having difficulty getting it to work. How would you go about making schedule_input.rb render a date picker and a time picker instead?

@rexblack
Copy link
Member

I recommend using the date_picker gem: https://github.com/benignware/date_picker. It acts as a general layer for integrating date- and time-pickers with rails. Currently supported is https://github.com/Eonasdan/bootstrap-datetimepicker as well as jquery-ui's datepicker.
The schedulable dummy app provides a fully working example of how to integrate date_picker gem:
Checkout the repo.
cd test/dummy
rails s
point your browser to http://localhost:3000/events/ and create a new event

Hope this will help!

Kind regards,
Rafael

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

2 participants