diff --git a/src/wp-admin/options.php b/src/wp-admin/options.php
index 84ac775fd43d8a5a5e7543029825d3345e4e3be9..2d607ebbeb0fac4289cb097e67e5ccdab08c60bb 100644
--- a/src/wp-admin/options.php
+++ b/src/wp-admin/options.php
@@ -265,13 +265,13 @@ if ( 'update' === $action ) { // We are saving settings sent from a settings pag
 		if ( ! empty( $_POST['date_format'] ) && isset( $_POST['date_format_custom'] )
 			&& '\c\u\s\t\o\m' === wp_unslash( $_POST['date_format'] )
 		) {
-			$_POST['date_format'] = $_POST['date_format_custom'];
+			$_POST['date_format'] = !empty( $_POST['date_format_custom'] ) ? $_POST['date_format_custom'] : 'F j, Y';
 		}
 
 		if ( ! empty( $_POST['time_format'] ) && isset( $_POST['time_format_custom'] )
 			&& '\c\u\s\t\o\m' === wp_unslash( $_POST['time_format'] )
 		) {
-			$_POST['time_format'] = $_POST['time_format_custom'];
+			$_POST['time_format'] = !empty( $_POST['time_format_custom'] ) ? $_POST['time_format_custom'] : 'g:i a';
 		}
 
 		// Map UTC+- timezones to gmt_offsets and set timezone_string to empty.
