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

Display option override in DateTimeField #8728

Open
AgostiniAlessandro opened this issue Oct 30, 2023 · 2 comments · May be fixed by #8729
Open

Display option override in DateTimeField #8728

AgostiniAlessandro opened this issue Oct 30, 2023 · 2 comments · May be fixed by #8729

Comments

@AgostiniAlessandro
Copy link
Contributor

Right now it’s possibile to configure a DateTimeField so that it allows the user to specify only the Date, only the Time or both.
In some cases it would be useful to allow the user to override this setting for a specific content.

For example and Event content type may contain a DateTimeField representing its starting date/time so in the field's Display option will be set to DateTime in content definition but the user may want to only show the starting date for a particular event and right now this is not possible.
By allowing the user to override the Display option value in the content we allow him to decide wether he wants the starting date or time to be shown for a particular event without having to modify the setting for the other contents of the same type.

@AgostiniAlessandro AgostiniAlessandro linked a pull request Oct 30, 2023 that will close this issue
@sebastienros
Copy link
Member

I think this should be a different field on the content type that would drive how the content is rendered. Otherwise we would provide all the field options to all content items.

Here just add "Display Time" as a boolean field, and use it in your theme/template to decide how to render it.

@BenedekFarkas BenedekFarkas linked a pull request Apr 15, 2024 that will close this issue
@BenedekFarkas
Copy link
Member

Here just add "Display Time" as a boolean field, and use it in your theme/template to decide how to render it.

You're saying that this should only be a type-level, but not item-level setting, right?

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 a pull request may close this issue.

3 participants