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

Datepicker re-opening #353

Closed
jasperSpeicher opened this issue Aug 14, 2017 · 2 comments
Closed

Datepicker re-opening #353

jasperSpeicher opened this issue Aug 14, 2017 · 2 comments

Comments

@jasperSpeicher
Copy link

In Chrome on mac: When I open the picker modal, then close it, then switch out of chrome, and then switch back, the datepicker has re-opened.

Happens in this sample app as well as in my own.
https://infomedialtd.github.io/angular2-materialize/#/DatePicker

@rubyboy
Copy link
Contributor

rubyboy commented Aug 15, 2017

Thanks for reporting this issue. Unfortunately, it's a bug in the original library, as suggested here: Dogfalo/materialize#4700

Here's the original bug with a suggested workaround: amsul/pickadate.js#160

I'll close the issue, for now, to keep it consistent with the MaterlializeCSS library.

@rubyboy rubyboy closed this as completed Aug 15, 2017
@samber
Copy link

samber commented Jan 26, 2018

These few lines worked for me:

  private datePickerOptions = {
    onClose: () => {
      $(":focus").blur();
    },
  };
<input type="text"materialize="pickadate" [materializeParams]="[datePickerOptions]" />

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

3 participants