Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Fix datepicker startingday #1732

Merged
merged 31 commits into from
Jun 18, 2018
Merged

Conversation

blackbaud-conorwright
Copy link
Contributor

Fixes #1731

@codecov-io
Copy link

codecov-io commented Jun 11, 2018

Codecov Report

Merging #1732 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1732      +/-   ##
==========================================
+ Coverage   99.98%   99.98%   +<.01%     
==========================================
  Files         409      409              
  Lines        8495     8504       +9     
  Branches     1244     1245       +1     
==========================================
+ Hits         8494     8503       +9     
  Misses          1        1
Impacted Files Coverage Δ
src/modules/datepicker/datepicker.component.ts 100% <100%> (ø) ⬆️
...c/modules/datepicker/datepicker-input.directive.ts 100% <100%> (ø) ⬆️

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 4b23bbc...b2abc1c. Read the comment docs.

Copy link
Member

@Blackbaud-SteveBrush Blackbaud-SteveBrush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, it might be a good idea to have a unit test "prove" that this input gets carried down to the calendar component.

@@ -26,6 +27,9 @@ export class SkyDatepickerComponent {
@ViewChild(SkyDropdownComponent)
public dropdown: SkyDropdownComponent;

@Input()
public startingDay: number;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@blackbaud-conorwright Is there any way we can add this input to the datepicker-input.directive.ts instead? The docs already mention that this input exists on the directive...
https://developer.blackbaud.com/skyux/components/datepicker#datepicker-input-directive-properties

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved. Though it feels weird to me that the calendar's starting day would be on the Input at all, I can see why it would be weird to have an input somewhere the rest weren't

@Blackbaud-SteveBrush
Copy link
Member

@blackbaud-conorwright Looks like there's a TSLint error: Error at /home/travis/build/blackbaud/skyux2/src/modules/datepicker/datepicker.component.ts:5:3: 'Input' is declared but never used."

@blackbaud-conorwright
Copy link
Contributor Author

ah yeah, sorry. I missed cleaning up the import 😛

@@ -50,6 +51,10 @@ export class SkyDatepickerComponent {
this.maxDate = _maxDate;
}

public setStartingDay(_startingDay: number) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious if there's a reason we're not using get and set for this property? Instead of a setStartingDay...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh yeah, they're also just public so we currently don't need the methods for this and the max/min dates. I can swap them all to getters and setters

@Blackbaud-SteveBrush Blackbaud-SteveBrush merged commit 7a0b610 into master Jun 18, 2018
@Blackbaud-SteveBrush Blackbaud-SteveBrush deleted the fix-datepicker-startingday branch June 18, 2018 19:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants