- πΊπΈUnited States mark_fullmer Tucson
This could use an issue title update. What 'buggy' behavior is being fixed here?
I've updated the title to capture the bugginess:
"Date and time" Form API element allows entry beyond min/max values
- Status changed to Needs work
over 1 year ago 8:30am 6 May 2023 - π©πͺGermany FeyP
This issue is being reviewed by the kind folks in Slack, #need-reveiw-queue. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request β as a guide.
Looking at the proposed resolution in the issue summary, it seems that the patch only implements the "Add the min/max elements even when the value on the element is empty." part. All the rest is missing, which is a lot. So this is very far from ready, unfortunately.
If this change breaks the functionality of the date field for working with dates outside the default range, then I think we also can't just rescope this issue and do the rest in a follow-up. We must at least ensure that people who use the field with existing data outside of the default range can still use the date field until the follow-up is implemented.
The issue linked from the top of the issue summary mentions that it is annoying for editors when they accidentally enter a 6 digit year instead of entering a 4 digit year and then the first 2 digits of the next date component. I tested the patch in both current Firefox and Chromium on Linux and although min and max are now set to the default date range, I can still enter 6 digit years. Only when I then try to submit the form, instead of getting an error from Form API about the required date format, I now get a browser validation error (which will also enforce that the date is within the date range specified). I'm not sure how to fix this, maybe this would need some Javascript?
I would also suggest to use an ordered list instead of an unordered list for the proposed resolution in the issue summary, as that will make it easier to refer to individual items in comments.
- last update
over 1 year ago 30,341 pass - last update
over 1 year ago 29,457 pass - π·πΊRussia Dimm
https://www.drupal.org/project/datetime_more β
The "Datetime More Widget" module allows the user to independently specify the minimum and maximum year 0001-9999.