Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rangePlugin behaviour #10

Open
dfuse-dev opened this issue Sep 28, 2021 · 0 comments
Open

rangePlugin behaviour #10

dfuse-dev opened this issue Sep 28, 2021 · 0 comments

Comments

@dfuse-dev
Copy link

dfuse-dev commented Sep 28, 2021

Hi,

Thank you so much for this extension. Im trying to use rangePlugin with two input fields but it doesnt perform like the demo at

https://flatpickr.js.org/plugins/ (it removes date field when editing or changes start date when selecting end date)

Maybe rangePlugin.js should be updated?

<?= $form->field($model, "startDate", getFieldOptions('calendar-check', 'Select start date'))
    ->widget(FlatpickrWidget::class, [
      'theme' =>'material_blue',
      'plugins' => [
          'rangePlugin' => [
              'input'=> "#ios-enddate",
          ],
      ],
      'locale' => [
        'firstDayOfWeek' => 1,
      ],
      'clientOptions' => [
          'mode' => 'range',
      ],
      'options' => [
        'placeholder' => Yii::t('app', 'Enter').' '.$model->getAttributeLabel('startDate')
      ],
  ])->label(false); ?>

Thanks again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant