diff --git a/core/includes/form.inc b/core/includes/form.inc
index 7ff1e24..2fa4bb5 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -3025,7 +3025,8 @@ function theme_form_datetime($variables) {
  *     - text: No HTML5 element, use a normal text field
  *     - none: Do not display a date element
  *   - #date_date_callbacks: Array of optional callbacks for the date element.
- *     Can be used to add a jQuery datepicker.
+ *     Can be used to add a jQuery datepicker, for instance. Drupal provides the
+ *     'datetime_jquery_datepicker_callback' as one possible choice.
  *   - #date_time_element: The time element.
  *     Options are:
  *     - time: Use a HTML5 time element type
@@ -3065,6 +3066,7 @@ function theme_form_datetime($variables) {
  *   $form = array(
  *     '#type' => 'datetime',
  *     '#default_value' => $date,
+ *     '#date_date_callbacks' => array('datetime_jquery_datepicker_callback'),
  *     '#date_date_element' => 'date',
  *     '#date_time_element' => 'none',
  *     '#date_year_range' => '2010:+3',
@@ -3262,6 +3264,62 @@ function datetime_validate($element, &$form_state) {
 }
 
 /**
+ * Callback to add the jQuery datepicker to a date element.
+ *
+ * The javascript in drupal.datepicker will check first for HTML5
+ * compliance, and then apply the jQuery datepicker as a fallback,
+ * only if the HTML5 widget is not supported.
+ *
+ * @param array $element
+ *   The 'date' element being altered.
+ * @param array $form_state
+ *   The form state array.
+ * @param object $date
+ *   The date object being manipulated by this element.
+ */
+function datetime_jquery_datepicker_callback(&$element, &$form_state, $date) {
+
+  // Get the format used by the element, and then convert it to
+  // the format needed by the datepicker.
+  $element_format = datetime_html5_format('date', $element);
+  $datepicker_format = datetime_datepicker_format($element_format);
+
+  // Make sure the date range includes the current year to avoid odd
+  // behavior when the datepicker doesn't find it in the date range.
+  // The date_range_years function will ensure the current date is
+  // included in the range.
+  $range = date_range_years($element['#date_year_range'], $date);
+
+  $settings = array(
+    'changeMonth' => 'true',
+    'changeYear' => 'true',
+    'autoPopUp' => 'focus',
+    'closeAtTop' => 'false',
+    'speed' => 'immediate',
+    'firstDay' => intval(variable_get('date_first_day', 0)),
+    'dateFormat' => $datepicker_format,
+    'yearRange' => $range[0] . ':' . $range[1],
+  );
+
+  // There could be an unknown number of instances of the datepicker
+  // on any page. Set a unique id for each element and its settings.
+  $new_id = drupal_html_id($element['#id'] . '-datepicker');
+  $element['date']['#id'] = $new_id;
+
+  $js_settings = array(
+    'type' => 'setting',
+    'data' => array(
+      'dateTime' => array(
+        '#' . $new_id => $settings,
+      ),
+    ),
+  );
+  $element['#attached']['js'][] = $js_settings;
+  $element['#attached']['library'][] = array('system', 'jquery.ui.datepicker');
+  $element['#attached']['library'][] = array('system', 'drupal.datepicker');
+}
+
+/**
+ * Alters the format string to comply with jQuery datepicker requirements.
+ *
+ * Used to transform a date format that uses the PHP format
+ * strings to the format used by the datepicker.
+ *
+ * @param string $format
+ *   A standard PHP format string.
+ *
+ * @return string
+ *   Returns the format string formatted correctly for the jQuery
+ *   timepicker.
+ */
+function datetime_datepicker_format($format) {
+  $replace = array(
+    'd' => 'dd',
+    'j' => 'd',
+    'l' => 'DD',
+    'D' => 'D',
+    'm' => 'mm',
+    'n' => 'm',
+    'F' => 'MM',
+    'M' => 'M',
+    'Y' => 'yy',
+    'y' => 'y',
+  );
+  return strtr($format, $replace);
+}

/**
 * Retrieves the right format for a HTML5 date element.
 *

diff --git a/core/misc/datepicker.js b/core/misc/datepicker.js
new file mode 100644
index 0000000..3fef66a
--- /dev/null
+++ b/core/misc/datepicker.js
@@ -0,0 +1,29 @@
+/**
+ * Attaches the datepicker behavior to all required fields
+ */
+(function ($) {
+Drupal.behaviors.dateTime = {
+  attach: function (context, settings) {
+
+  var i = document.createElement("input");
+    i.setAttribute("type", "date");
+    if (i.type == "text") {
+      // No native date picker support? Use jQueryUI.
+      for (var id in Drupal.settings.dateTime) {
+        $(id).bind('focus', Drupal.settings.dateTime[id], function(e) {
+          if (!$(this).hasClass('date-popup-init')) {
+            var dateTime = e.data;
+              $(this)
+                .datepicker(dateTime)
+                .addClass('date-popup-init')
+              $(this).click(function(){
+                $(this).focus();
+              });
+          }
+        });
+      }
+      }
+  }
+};
+})(jQuery);
+
diff --git a/core/modules/field/modules/datetime/datetime.views.inc b/core/modules/field/modules/datetime/datetime.views.inc
index b3292f2..2f28a56 100644
--- a/core/modules/field/modules/datetime/datetime.views.inc
+++ b/core/modules/field/modules/datetime/datetime.views.inc
@@ -28,4 +28,4 @@ function datetime_field_views_data_views_data_alter(&$data) {
     }
   }
   return $data;
-}
+}
\ No newline at end of file
diff --git a/core/modules/field/modules/datetime/lib/Drupal/datetime/Plugin/field/widget/DatetimeDatepicker.php b/core/modules/field/modules/datetime/lib/Drupal/datetime/Plugin/field/widget/DatetimeDatepicker.php
index 1c99a9c..12674b8 100644
--- a/core/modules/field/modules/datetime/lib/Drupal/datetime/Plugin/field/widget/DatetimeDatepicker.php
+++ b/core/modules/field/modules/datetime/lib/Drupal/datetime/Plugin/field/widget/DatetimeDatepicker.php
@@ -99,7 +99,7 @@ public function formElement(array $items, $delta, array $element, $langcode, arr
       '#date_increment' => 1,
       '#date_date_format'=>  $date_format,
       '#date_date_element' => $date_type,
-      '#date_date_callbacks' => array(),
+      '#date_date_callbacks' => array('datetime_jquery_datepicker_callback'),
       '#date_time_format' => $time_format,
       '#date_time_element' => $time_type,
       '#date_time_callbacks' => array(),
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 5f3faff..a711c68 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -491,7 +491,7 @@ function system_element_info() {
     '#theme_wrappers' => array('form_element'),
     '#date_date_format' => variable_get('date_format_html_date', 'Y-m-d'),
     '#date_date_element' => 'date',
-    '#date_date_callbacks' => array(),
+    '#date_date_callbacks' => array('datetime_jquery_datepicker_callback'),
     '#date_time_format' => variable_get('date_format_html_time', 'H:i:s'),
     '#date_time_element' => 'time',
     '#date_time_callbacks' => array(),
@@ -1968,7 +1968,21 @@ function system_library_info() {
       array('system', 'drupalSettings'),
     ),
   );
-
+  $libraries['drupal.datepicker'] = array(
+    'title' => 'Drupal datepicker',
+    'version' => VERSION,
+    'js' => array(
+      'core/misc/datepicker.js' => array(),
+    ),
+    'dependencies' => array(
+      array('system', 'jquery'),
+      array('system', 'jquery.ui.core'),
+      array('system', 'jquery.ui.datepicker'),
+      array('system', 'jquery.once'),
+      array('system', 'drupal'),
+      array('system', 'drupalSettings'),
+    ),
+  );
   $libraries['drupal.system'] = array(
     'title' => 'System',
     'version' => VERSION,
