Skip to content

Commit

Permalink
Amended the date formats namespace to include localgov_forms
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Ozogolu committed Apr 16, 2024
1 parent abe8ae7 commit 269b436
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ public function setDefaultValue(array &$element) {
public static function validateDate(&$element, FormStateInterface $form_state, &$complete_form) {

// Adds a short date and short date time format.
$uk_short_date_format = DateFormat::load('uk_html_short_date')->getPattern();
$uk_datetime_format = DateFormat::load('uk_html_datetime')->getPattern();
$localgov_forms_uk_short_date_format = DateFormat::load('localgov_forms_uk_html_short_date')->getPattern();
$localgov_forms_uk_datetime_format = DateFormat::load('localgov_forms_uk_html_datetime')->getPattern();

$element['#date_date_format'] = $uk_short_date_format;
$element['#date_time_format'] = $uk_datetime_format;
$element['#date_date_format'] = $localgov_forms_uk_short_date_format;
$element['#date_time_format'] = $localgov_forms_uk_datetime_format;

parent::validateDate($element, $form_state, $complete_form);
}
Expand Down

0 comments on commit 269b436

Please sign in to comment.