Skip to content
Snippets Groups Projects

Issue #1244458: Better handling for the date format descriptions

Open Greg Boggs requested to merge issue/date-1244458:1244458-better-handling-for into 7.x-2.x
1 file
+ 4
8
Compare changes
  • Side-by-side
  • Inline
@@ -441,15 +441,11 @@ function date_popup_process_date_part(&$element) {
'#ajax' => !empty($element['#ajax']) ? $element['#ajax'] : FALSE,
'#required' => $element['#required'],
);
// Do NOT overwrite the actual input with the default value.
// @todo Figure out exactly when this is needed, in many places it is not.
$sub_element['#description'] = ' ' . t('E.g., @date', array(
'@date' => date_format_date(
date_example_date(),
'custom',
date_popup_date_format($element)
),
));
if (!isset($element['#description'])) {
$sub_element['#attributes']['placeholder'] = date_format_date(date_example_date(), 'custom', date_popup_date_format($element));
}
return $sub_element;
}
Loading