diff --git a/core/modules/datetime/datetime.module b/core/modules/datetime/datetime.module
index ccf1a0c..abe47a4 100644
--- a/core/modules/datetime/datetime.module
+++ b/core/modules/datetime/datetime.module
@@ -226,13 +226,8 @@ function template_preprocess_datetime_wrapper(&$variables) {
   $element = $variables['element'];
 
   // If the element is required, a required marker is appended to the label.
-  $variables['required'] = NULL;
-  if(!empty($element['#required'])) {
-    $variables['required'] = array(
-      '#theme' => 'form_required_marker',
-      '#element' => $element,
-    );
-  }
+  $form_required_marker = array('#theme' => 'form_required_marker', '#element' => $element);
+  $variables['required'] = !empty($element['#required']) ? drupal_render($form_required_marker) : NULL;
 
   if (!empty($element['#title'])) {
     $variables['title'] = $element['#title'];
