Skip to content
Snippets Groups Projects
Commit 54d0948f authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #133189 by Darren Oh: fixed empty date field test.

parent 8630e5ed
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -1187,7 +1187,7 @@ function theme_date($element) {
*/
function expand_date($element) {
// Default to current date
if (!isset($element['#value'])) {
if (empty($element['#value'])) {
$element['#value'] = array('day' => format_date(time(), 'custom', 'j'),
'month' => format_date(time(), 'custom', 'n'),
'year' => format_date(time(), 'custom', 'Y'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment