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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include Date Field #1530

Merged
merged 2 commits into from Jan 25, 2020
Merged

Conversation

sebaherrera07
Copy link
Contributor

Added a Date Field, where the datepicker lets the admin user select just a date without time.

Screen Shot 2020-01-16 at 12 49 51 PM

Notes:

  • After needing a Date field on the project I'm working, and seeing there were other people that reported their desire to have it (see Date Field?聽#741), I decided to contribute to Administrate with this PR 馃槂

Copy link
Collaborator

@pablobm pablobm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. I have the slight reservation about handling dates the same way as datetimes (because timezones). However date is one of the native types for ActiveRecord migrations[1], so I think it deserves a field type in Administrate.

Could you please fix the Hound lint warning, before we merge?

Thank you!

[1] https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-add_column

@pablobm pablobm merged commit d153bcf into thoughtbot:master Jan 25, 2020
@pablobm
Copy link
Collaborator

pablobm commented Jan 25, 2020

Thank you @sebaherrera07!

@pablobm pablobm mentioned this pull request Jan 25, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants