Index: src/wp-includes/script-loader.php
===================================================================
--- src/wp-includes/script-loader.php	(revision 37685)
+++ src/wp-includes/script-loader.php	(working copy)
@@ -43,6 +43,8 @@
  * @param WP_Scripts $scripts WP_Scripts object.
  */
 function wp_default_scripts( &$scripts ) {
+	global $wp_locale;
+
 	include( ABSPATH . WPINC . '/version.php' ); // include an unmodified $wp_version
 
 	$develop_src = false !== strpos( $wp_version, '-src' );
@@ -233,6 +235,39 @@
 		'manyResults' => __( '%d results found. Use up and down arrow keys to navigate.' ),
 	) );
 
+	// Localize jQuery UI datepicker.
+	if ( isset( $wp_locale ) ) { // Not set when loaded via load-scripts.php.
+		$datepicker_date_format = str_replace(
+			array(
+				'd', 'j', 'l', 'z', // day
+				'F', 'M', 'n', 'm', // month
+				'Y', 'y'            // year
+			),
+			array(
+				'dd', 'd', 'DD', 'o',
+				'MM', 'M', 'm', 'mm',
+				'yy', 'y'
+			),
+			get_option( 'date_format' )
+		);
+		$datepicker_defaults = wp_json_encode( array(
+			'closeText'       => __( 'Close' ),
+			'currentText'     => __( 'Today' ),
+			'monthNames'      => array_values( $wp_locale->month ),
+			'monthNamesShort' => array_values( $wp_locale->month_abbrev ),
+			'monthStatus'     => __( 'Show a different month' ),
+			'nextText'        => __( 'Next' ),
+			'prevText'        => __( 'Previous' ),
+			'dayNames'        => array_values( $wp_locale->weekday ),
+			'dayNamesShort'   => array_values( $wp_locale->weekday_abbrev ),
+			'dayNamesMin'     => array_values( $wp_locale->weekday_initial ),
+			'dateFormat'      => $datepicker_date_format,
+			'firstDay'        => absint( get_option( 'start_of_week' ) ),
+			'isRTL'           => $wp_locale->is_rtl(),
+		) );
+		$scripts->add_inline_script( 'jquery-ui-datepicker', "jQuery(document).ready(function(jQuery){jQuery.datepicker.setDefaults({$datepicker_defaults});});" );
+	}
+
 	// deprecated, not used in core, most functionality is included in jQuery 1.3
 	$scripts->add( 'jquery-form', "/wp-includes/js/jquery/jquery.form$suffix.js", array('jquery'), '3.37.0', 1 );
 
