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

Date Field? #741

Closed
gregblass opened this issue Jan 23, 2017 · 4 comments
Closed

Date Field? #741

gregblass opened this issue Jan 23, 2017 · 4 comments

Comments

@gregblass
Copy link

I defined an attribute in my schema with type "Date", but it is being defaulted to "DateTime". I tried to update this in ATTRIBUTE_TYPES and change it to Field::Date, but I'm getting: uninitialized constant Administrate::Field::Date.

Are date's without times not supported or am I doing something wrong? I would expect the 00:00:00 to not show up on the form and for the datepicker to not include the time control?

@gregblass
Copy link
Author

I tried generating a field for type Date:

rails generate administrate:views:field date

The generator seemed to run fine, but I'm getting:

uninitialized constant Administrate::Field::Date

Anything I'm doing wrong here? Shouldn't there be fields for Date, Time, and DateTime individually? I use all 3 types typically depending if I need to store one, the other, or both.

@BenMorganIO
Copy link
Collaborator

Sorry, we've only got a field for DateTime ATM. If you'd like to do a PR and get a Date and Time field into this project, that'd be super appreciated! 👍

@gregblass
Copy link
Author

Got it, thanks for the info!

@pablobm
Copy link
Collaborator

pablobm commented Jan 25, 2020

Implemented at #1530

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

3 participants