I am writing a custom module in which i am declaring a $form element as #type=> 'datetime'
The code for the buildForm method is
$form['timesave'] = array( '#type' => 'datetime', '#title' => $this->t('Select Date and time'), );
Now my question is how do we get the value of the field on form Submit as i have to store the value in a configuration
I have tried with
This is giving an array some protected methods.