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.
With a form element of type date_select, a user is allowed to select invalid dates, such as April 31, or February 30. Upon submission, these dates are ignored, however, to improve UX, it would be better to have some JavaScript that manipulates the number of days shown in the day element on the fly, removing days that cannot exist based on the values in the year and month elements.
I'm submitting a patch that contains this JS, and automatically adds it to date_select elements.
I will attach it to the first comment, so that I can get the issue number to include in the patch name.
Comment | File | Size | Author |
---|---|---|---|
#2 | date_api-date_select_js-2733119-1-D7.patch | 4.21 KB | Jaypan |
|
Comments
Comment #2
Jaypan CreditAttribution: Jaypan at Jaypan commentedComment #3
DamienMcKennaThanks for the patch, we'll try to review it soon.
BTW when you upload a patch it helps to set the status to "needs review", that triggers the testbots and lets others know that there's something review.
Comment #4
Jaypan CreditAttribution: Jaypan commentedI don't even remember starting this thread. It must have been for a project I'm not on anymore.