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 question min, max configuration #2193

Open
Yelinz opened this issue Nov 10, 2022 · 1 comment
Open

Date question min, max configuration #2193

Yelinz opened this issue Nov 10, 2022 · 1 comment
Labels
enhancement New feature or request needs discussion

Comments

@Yelinz
Copy link
Member

Yelinz commented Nov 10, 2022

Implement min_date and max_date configurations from flatpickr.
Would also need some small changes in caluma

@Yelinz Yelinz added the enhancement New feature or request label Nov 10, 2022
@anehx
Copy link
Contributor

anehx commented Jan 31, 2024

Use cases I can think of:

  • min/max date x days/months/years in the future / past from now
  • min/max date x days/months/years in the future / past from another date field
  • fixed date (edge case IMO)

So in my opinion this configuration should be JEXL fields with a couple of transforms to alter dates e.g.:

  • today (context, not transform)
  • |plus({ days: 1, months: 2, years: 3 }) (naming from luxon API)
  • |minus({ days: 1, months: 2, years: 3 }) (naming from luxon API)

So you could do stuff like:

  • "my-other-date-field"|answer|plus({ days: 5 })
  • today|minus({ months: 1 })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs discussion
Projects
None yet
Development

No branches or pull requests

2 participants