diff --git a/core/modules/system/src/Form/DateFormatFormBase.php b/core/modules/system/src/Form/DateFormatFormBase.php index c843ba2..1ea4bab 100644 --- a/core/modules/system/src/Form/DateFormatFormBase.php +++ b/core/modules/system/src/Form/DateFormatFormBase.php @@ -8,6 +8,7 @@ namespace Drupal\system\Form; use Drupal\Core\Ajax\AjaxResponse; +use Drupal\Core\Ajax\InvokeCommand; use Drupal\Core\Ajax\ReplaceCommand; use Drupal\Core\Config\Entity\ConfigEntityStorageInterface; use Drupal\Core\Datetime\DateFormatter; @@ -100,6 +101,7 @@ public static function dateTimeLookup(array $form, FormStateInterface $form_stat // breaks the layout. $response = new AjaxResponse(); $response->addCommand(new ReplaceCommand('#edit-date-format-suffix', '' . $format . '')); + $response->addCommand(new InvokeCommand('#edit-date-format-pattern', 'focus')); return $response; }