-
-
Notifications
You must be signed in to change notification settings - Fork 814
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
Afform - Support date range filters for search displays #19632
Conversation
(Standard links)
|
@colemanw I tested this on my local and confirmed it works as you seem to have intended but a couple of thoughts
|
So I have a not-totally-formed idea about this, which is that
|
I agree with all of that and I suppose that can be more future work but I guess my more immediate question is this one: "Should this ability be limited to search afforms e.g. if your building an afform of a standard kind which is for updating / creating entities it feels like having this an option to change the field to seems problematic to me / impractical" I would appreciate some other opinions here @eileenmcnaughton @totten @JoeMurray but I am also comfortable with just merging this as is but it would feel odd if you have a more input oriented form and you can make the date field a select range but I suppose it can work |
So this basically allows someone to change a date field which by default is added like this To be a select list rather than a date or number enter Which means that you then get all the relative date options but no choose your own range option On a search display makes sense to me But on an ordinary afform it feels a bit odd |
Well, how else are you going to input "This Individual was born Yesterday!" ;) |
I bet an issue like this led to adding things like mode that we later came to regret. I'm not sure what the best implementation pattern is, but from a UX perspective the person specifying an Afform should be prevented from using the regular CiviCRM date range options if only a single value is to be saved. Tangentially related but might help think about pattern: we also have a need for range between low and high on some money values, so the pattern for deciding on form widgets for specifying that for search versus entering a value (maybe with a select) is pretty similar. |
As per discussion in Matter Most https://chat.civicrm.org/civicrm/pl/6dhzoj8b6tbxudcsa7snm1oikc I am going to merge this and work on following up to limit this to just search displays |
Overview
This allows afform date fields to be changed to type "Select" to choose a relative date range.
Before
Date fields could only be dates.
After
Date fields can be select list of relative date ranges.