-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
dev/core#1847 Fix datepicker to respect the searchDate offsets #17762
Conversation
(Standard links)
|
@eileenmcnaughton 3 test failures relate |
CRM/Core/Form.php
Outdated
*/ | ||
public function &add( | ||
$type, $name, $label = '', | ||
$attributes = '', $required = FALSE, $extra = NULL | ||
$attributes = [], $required = FALSE, $extra = NULL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@seamuslee001 I think this makes sense for the test fails... it just gets otherwise converted & it's pretty nasty defaulting an array to a string
Added has-test since clearly hitting test fails! |
I have some misgivings about this since I suspect the rationale behind the search offsets was primarily about the clunky UI. Having said that I think the datepicker UI is a bit clunky on this front too as it's not obvious you can choose earlier dates. This does at least restore established behaviour. https://lab.civicrm.org/dev/core/-/issues/1847
OK - this is probably more conservative - will it pass now? |
Overview
This restores previous behaviour where search datepicker fields had date ranges bounded by the values configured on the date preferences screenn
Before
(with default range of 20 years offset in either direction)
After
(with default range of 20 years offset in either direction)
Technical Details
The min and max year are from civicrm_preferences_date table
Comments
I have some misgivings about this since I suspect the rationale behind the search offsets was primarily about the clunky UI.
Having said that I think the datepicker UI is a bit clunky on this front too as it's not obvious you can choose earlier
dates. This does at least restore established behaviour.
https://lab.civicrm.org/dev/core/-/issues/1847
ping @colemanw @seamuslee001 @mattwire @yashodha