Navigation Menu

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

fix(datepicker): handle multiple input changes once #3565

Conversation

maxokorokov
Copy link
Member

Previously internally calling

service.minDate = ...;
service.maxDate = ...;

resulted in two observable emissions, one per input change.

Now the API is changed to:

service.set({minDate: ..., maxDate: ...})

which results in a single emission for any number of inputs changed at the same time.

Fixes #3545

Previously internally calling

```ts
service.minDate = ...;
service.maxDate = ...;
```
resulted in two observable emissions, one per input change.

Now the API is changed to:

```ts
service.set({minDate: ..., maxDate: ...})
```

which results in a single emission for any number of inputs changed at the same time.

Fixes ng-bootstrap#3545
@maxokorokov maxokorokov force-pushed the datepicker/fix/min-max-dates-in-future branch from c331cb0 to bb03aab Compare January 27, 2020 16:23
@codecov-io
Copy link

codecov-io commented Jan 27, 2020

Codecov Report

Merging #3565 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #3565      +/-   ##
=========================================
+ Coverage   91.67%   91.7%   +0.02%     
=========================================
  Files         100     100              
  Lines        2882    2892      +10     
  Branches      532     533       +1     
=========================================
+ Hits         2642    2652      +10     
  Misses        183     183              
  Partials       57      57
Flag Coverage Δ
#e2e 56.36% <56.41%> (+0.08%) ⬆️
#unit 88.54% <100%> (+0.03%) ⬆️
Impacted Files Coverage Δ
src/datepicker/datepicker-service.ts 97.41% <100%> (+0.14%) ⬆️
src/datepicker/datepicker.ts 97.97% <100%> (+0.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4f61496...bb03aab. Read the comment docs.

@benouat benouat merged commit 4ac0352 into ng-bootstrap:master Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dynamic change of minDate and maxDate is gving error when changed to future than previous maxDate value
3 participants