Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
on date select widget fist (month)select box is normal select and the second (years) select box is chosen
Comment | File | Size | Author |
---|---|---|---|
#3 | 1915186-chosen-date-recurse.patch | 1.89 KB | Dave Reid |
Comments
Comment #1
jawad.shah CreditAttribution: jawad.shah commentedfacing same :(
Comment #2
Hydra CreditAttribution: Hydra commentedYeah, it is. Thr problem ist the implementation of the "min width". This means, that it only applies on fields, that are greater then x. The date fields (except the day field) are smaller, thats why it's not applying. I'm going to find a solution.
However, since we made, that chosen only applies to select fields, we need to add support for the date_combo widget by date module. I added this in http://drupalcode.org/project/chosen.git/commit/4bad63f
The other problem with the minWidth property still exists. I removed the check to give smaller items the minwith, but I believe that this is not the right solution, I need to discuss this with the other maintainers.
Comment #3
Dave ReidThe main problem is that the date_combo widget contains *many* different select elements. We need to ensure that we apply chosen properly to each one since it looks bad if the user has enabled Chosen for the date field, and they only see some select fields with Chosen and others as normal select fields. Now that #2210767: Add 'chosen-enable' and 'chosen-disable' classes along with corresponding FAPI property has landed it's a bit easier to actually do this recursion.
Comment #4
Dave ReidFor solving the fact that by default some of the date select fields get converted to Chosen, I think we'll also need #2213231: Make it possible to force-disable Chosen for a field widget which proposed to change the default for the date_combo widget to 'Disable chosen' and it has to be manually enabled in the field UI.
Comment #5
Dave ReidTested and committed #3 to 7.x-2.x: http://drupalcode.org/project/chosen.git/commit/070d059