'data-drupal-date-formatter' => 'source',
],
'#field_suffix' => ' <small class="js-hide" data-drupal-date-formatter="preview">' .
$this->
t('Displayed as %date_format',
['%date_format' => ''
]) . '</small>',
];
$form['langcode'
] =
[ '#type' => 'language_select',
'#title' =>
$this->
t('Language'
),
'#languages' => LanguageInterface::STATE_ALL,
'#default_value' =>
$this->entity->
language()->
getId(),
];
$form['#attached'
]['drupalSettings'
]['dateFormats'
] =
$this->dateFormatter->
getSampleDateFormats();
$form['#attached'
]['library'
][] = 'system/drupal.system.date';
return parent::
form($form,
$form_state);
} /**
* {@inheritdoc}
*/
public function validateForm(array &
$form, FormStateInterface
$form_state) { parent::
validateForm($form,
$form_state);
// The machine name field should already check to see if the requested