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(date service): prevent format calls if date isn't passed #1291

Merged
merged 7 commits into from
Mar 14, 2019
Merged

fix(date service): prevent format calls if date isn't passed #1291

merged 7 commits into from
Mar 14, 2019

Conversation

yggg
Copy link
Contributor

@yggg yggg commented Mar 11, 2019

Please read and mark the following check list before creating a pull request:

Short description of what this resolves:

Fixes #1251

@yggg yggg requested a review from nnixaa March 11, 2019 11:28
@yggg yggg mentioned this pull request Mar 11, 2019
1 task
@yggg yggg changed the title Fix/format range fix(date service): prevent format calls if date isn't passed Mar 11, 2019
@codecov
Copy link

codecov bot commented Mar 11, 2019

Codecov Report

Merging #1291 into master will increase coverage by 0.4%.
The diff coverage is 90.9%.

@@           Coverage Diff            @@
##           master   #1291     +/-   ##
========================================
+ Coverage   79.49%   79.9%   +0.4%     
========================================
  Files         232     232             
  Lines        7024    7032      +8     
  Branches      587     590      +3     
========================================
+ Hits         5584    5619     +35     
+ Misses       1272    1244     -28     
- Partials      168     169      +1
Impacted Files Coverage Δ
.../theme/components/datepicker/datepicker-adapter.ts 100% <100%> (+35.29%) ⬆️
...amework/date-fns/services/date-fns-date.service.ts 76.19% <100%> (+2.5%) ⬆️
...c/framework/moment/services/moment-date.service.ts 93.15% <66.66%> (+0.19%) ⬆️
...heme/components/datepicker/datepicker.component.ts 83.92% <0%> (+2.38%) ⬆️
...heme/components/datepicker/datepicker.directive.ts 79.5% <0%> (+9.01%) ⬆️

@nnixaa
Copy link
Collaborator

nnixaa commented Mar 11, 2019

@yggg can we add a test for datepicker-adapter.ts?

@yggg yggg added the WIP label Mar 11, 2019
@yggg yggg removed the WIP label Mar 12, 2019
@yggg
Copy link
Contributor Author

yggg commented Mar 12, 2019

@yggg can we add a test for datepicker-adapter.ts?

@nnixaa Done in 7e1cada and 953ffc9.

Please note, I also slightly changed the logic of the format method of NbRangeAdapterService (8b7cc71). Now it tries to format end date only if the start date is valid.

@yggg yggg merged commit a3d6035 into akveo:master Mar 14, 2019
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

Successfully merging this pull request may close these issues.

NbRangePicker error with date-fns
2 participants