Issue #2723159 : Datetime form element cannot validate when using a format without seconds
4 unresolved threads
Closes #2723159
Merge request reports
Activity
67 68 $form['actions'] = [ 69 '#type' => 'actions', 70 'submit' => [ 71 '#type' => 'submit', 72 '#value' => $this->t('Submit'), 73 ], 74 ]; 75 76 return $form; 77 } 78 79 /** 80 * {@inheritdoc} 81 */ 82 public function submitForm(array &$form, FormStateInterface $form_state) { 10 /** 11 * Datetime time sub-element test form. 12 */ 13 class FormTestDatetimeTimeTest extends FormBase { 14 15 /** 16 * {@inheritdoc} 17 */ 18 public function getFormId() { 19 return 'form_test_datetime_time'; 20 } 21 22 /** 23 * {@inheritdoc} 24 */ 25 public function buildForm(array $form, FormStateInterface $form_state) { 3 declare(strict_types=1); 4 5 namespace Drupal\form_test\Form; 6 7 use Drupal\Core\Form\FormBase; 8 use Drupal\Core\Form\FormStateInterface; 9 10 /** 11 * Datetime time sub-element test form. 12 */ 13 class FormTestDatetimeTimeTest extends FormBase { 14 15 /** 16 * {@inheritdoc} 17 */ 18 public function getFormId() {
Please register or sign in to reply