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.
The date component never validates when it is marked as required, not even when it has today as a default value.
The reason seams to be that values are checked as $element['day']['#value'] while it should be $element['#value']['day'] etc.
Note that I included a diff file.
Comment | File | Size | Author |
---|---|---|---|
#1 | date.inc_.diff | 2.6 KB | jpulles |
Comments
Comment #1
jpulles CreditAttribution: jpulles commentedComment #2
quicksketchI cannot confirm this problem. Could you check that it still exists in the latest CVS version? Date's have been getting an overhaul in #738678: Remove custom Webform "timezone" handling and #709854: Convert date component database storage to use ISO 8601 strings (similar to timestamps), so this may have been fixed in those issues, though in a different manner since the lines you changed in your patch have not been modified by those changes.
Comment #3
quicksketchI've double checked this once again as part of #752414: Time fields with 12 hour format that are required are returning an error on form submission. Please reopen if you find the problem still exists, I cannot find it with the latest version.