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 doesn't refresh with new options on emit #393

Open
westwick opened this issue Dec 4, 2017 · 1 comment
Open

Datepicker doesn't refresh with new options on emit #393

westwick opened this issue Dec 4, 2017 · 1 comment

Comments

@westwick
Copy link

westwick commented Dec 4, 2017

I think this is a common use case, to have two datepickers linked for a startdate and endate. In my case I'd like to update the 2nd one to have a min date based on the selection of the first. So I have it set up like this:

<input id="endDate" name="endDate" [(ngModel)]="endDate" materialize="pickadate" (ngModelChange)="endDateChange()" [materializeActions]="endActions" [materializeParams]="[endOptions]" type="text" />

then when startDateChange() is called from first datepicker, I do something like this:

startDateChange() {
  let newOptions = {min: '2017-12-25'};
  this.endActions.emit({action: 'pickadate', params: [newOptions]});
}

after this is called, the new min-date is not updated on the endDate datepicker. Am I doing this wrong?

@westwick
Copy link
Author

westwick commented Dec 4, 2017

Sorry I think this is actually the same as #280 -- anyone else have any other tips? Trying to avoid using jQuery

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