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

Any way to filter/group by date past or future? #53

Open
frankbits opened this issue Sep 5, 2023 · 4 comments
Open

Any way to filter/group by date past or future? #53

frankbits opened this issue Sep 5, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@frankbits
Copy link

I have events, that dependent on their date get displayed as upcoming events, or as "highlights" with additional videos, images, comments.
I would like to easily be able to filter/group for this, to easily edit only future or only past events.

Maybe the filter/group-option could provide "current time/date(day,month,year)"-"template tags", and to compare two/multiple values.

    view_filters:
      - label: 'upcoming Events'
        field: datetime
        greater: '{{currentDate}}'
      - label: 'Highlights'
        field: datetime
        lower: '{{currentDate}}'
    view_groups:
      - label: "upcoming?"
        field: datetime
        compare: '{{currentDate}}'
@kyoshino
Copy link
Member

kyoshino commented Sep 5, 2023

I also have a client having events, and yeah, it makes sense to enhance the view filters/groups. decaporg/decap-cms#3617 has a similar discussion. I could implement eq, lt, gt, in, etc.

@kyoshino kyoshino added the enhancement New feature or request label Sep 5, 2023
@frankbits
Copy link
Author

implementing those options sounds good, but to be really useful for this use case they need something like the template tags to compare against.

@kyoshino
Copy link
Member

Looks like I need this for my clients managing an event/concert list using Sveltia CMS. Will have a look soonish.

@frankbits
Copy link
Author

Looks like I need this for my clients managing an event/concert list using Sveltia CMS. Will have a look soonish.

Same UseCase here🙃

@kyoshino kyoshino self-assigned this Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants