diff --git a/core/includes/form.inc b/core/includes/form.inc
index 27e4d50..89f8485 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -1204,7 +1204,7 @@ function password_confirm_validate($element, &$element_state) {
 /**
  * Returns HTML for an #date form element.
  *
- * Supports HTML5 types of 'date', 'datetime', 'datetime-local', and 'time'.
+ * Supports HTML5 types of 'date', 'datetime' and 'time'.
  * Falls back to a plain textfield. Used as a sub-element by the datetime
  * element type.
  *
@@ -1228,6 +1228,46 @@ function theme_date($variables) {
 }
 
 /**
+ * Returns HTML for an #datetime_local form element.
+ *
+ * @param array $variables
+ *   An associative array containing:
+ *   - element: An associative array containing the properties of the element.
+ *     Properties used: #title, #value, #options, #description, #required,
+ *     #attributes, #id, #name, #type, #min, #max, #step, #value, #size.
+ *
+ * @ingroup themeable
+ */
+function theme_datetime_local($variables) {
+  $element = $variables['element'];
+  if (empty($element['attribute']['type'])) {
+    $element['attribute']['type'] = 'datetime-local';
+  }
+
+  element_set_attributes($element, array('id', 'name', 'type', 'min', 'max', 'step', 'value', 'size'));
+  _form_set_attributes($element, array('form-' . $element['attribute']['type']));
+
+  return '<input' . new Attribute($element['#attributes']) . ' />';
+}
+
+/**
+ * Prepares a #type 'datetime-local' render element for theme_input().
+ *
+ * @param array $element
+ *   An associative array containing the properties of the element.
+ *   Properties used: #title, #value, #return_value, #description, #required,
+ *   #attributes, #checked.
+ *
+ * @return array
+ *   The $element with prepared variables ready for theme_input().
+ */
+function form_pre_render_datetime_local($element) {
+  $element['#attributes']['type'] = 'datetime-local';
+
+  return $element;
+}
+
+/**
  * Sets the value for a weight element, with zero as a default.
  */
 function weight_value(&$form) {
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 654803c..c7abd3a 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -2643,6 +2643,9 @@ function drupal_common_theme() {
     'date' => array(
       'render element' => 'element',
     ),
+    'datetime_local' => array(
+      'render element' => 'element',
+    ),
     'checkboxes' => array(
       'render element' => 'element',
       'template' => 'checkboxes',
diff --git a/core/modules/system/lib/Drupal/system/Tests/Form/FormTest.php b/core/modules/system/lib/Drupal/system/Tests/Form/FormTest.php
index c261031..4e92771 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Form/FormTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Form/FormTest.php
@@ -94,6 +94,9 @@ function testRequiredFields() {
     $elements['file']['element'] = array('#title' => $this->randomName(), '#type' => 'file');
     $elements['file']['empty_values'] = $empty_strings;
 
+    $elements['datetime_local']['element'] = array('#title' => $this->randomName(), '#type' => 'datetime_local');
+    $elements['datetime_local']['empty_values'] = $empty_strings;
+
     // Regular expression to find the expected marker on required elements.
     $required_marker_preg = '@<(?:label|legend).*<span class="form-required" aria-hidden="true">\*</span>.*</(?:label|legend)>@';
 
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 1a2ad30..ea64c07 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -498,6 +498,12 @@ function system_element_info() {
     '#theme' => 'date',
     '#theme_wrappers' => array('form_element'),
   );
+  $types['datetime_local'] = array(
+    '#input' => TRUE,
+    '#pre_render' => array('form_pre_render_datetime_local'),
+    '#theme' => 'datetime_local',
+    '#theme_wrappers' => array('form_element'),
+  );
   $types['file'] = array(
     '#input' => TRUE,
     '#multiple' => FALSE,
diff --git a/core/themes/seven/style.css b/core/themes/seven/style.css
index aa699e0..4427e83 100644
--- a/core/themes/seven/style.css
+++ b/core/themes/seven/style.css
@@ -754,6 +754,7 @@ label {
   vertical-align: middle;
 }
 .form-disabled input.form-text,
+.form-disabled input.form-datetime-local,
 .form-disabled input.form-tel,
 .form-disabled input.form-email,
 .form-disabled input.form-url,
