Commit d06e8f49 authored by Martin Anderson-Clutz's avatar Martin Anderson-Clutz
Browse files

Issue #3300325 by mandclu: Granularity filter is exposed to end users

parent 73fdb4ef
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -78,7 +78,9 @@ class Date extends CoreDate implements ContainerFactoryPluginInterface {
  /**
   * Add a granularity selector to the value form.
   */
  protected function valueForm(&$form, FormStateInterface $form_state) {
  public function buildOptionsForm(&$form, FormStateInterface $form_state) {
    parent::buildOptionsForm($form, $form_state);

    $options = [
      'second' => $this->t('Second'),
      'minute' => $this->t('Minute'),
@@ -96,7 +98,6 @@ class Date extends CoreDate implements ContainerFactoryPluginInterface {
      '#default_value' => $this->options['value']['granularity'],
      '#weight' => 10,
    ];
    parent::valueForm($form, $form_state);
  }

  /**