-
Notifications
You must be signed in to change notification settings - Fork 12
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: range without end #63
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -337,6 +337,29 @@ describe('Set selectable range', function() { | |
}); | ||
}); | ||
|
||
it('should set selectable range with only begin', function() { | ||
var start = makeRangeObj(9, 30); | ||
var selector, hourSelect, minSelect, selectOption; | ||
|
||
timepickerNoMeridiem.setRange(start); | ||
|
||
selector = timepickerNoMeridiem.element.querySelectorAll('select[aria-label="Time"]'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. μ€μ λ³μμ ν λΉλλ κ²°κ³Όλ¬Όμ μκ°νλ©΄ |
||
hourSelect = selector[0]; | ||
minSelect = selector[1]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
selectOption = hourSelect.querySelector('option[value="8"]'); | ||
expect(selectOption.disabled).toBe(true); | ||
selectOption = hourSelect.querySelector('option[value="9"]'); | ||
expect(selectOption.disabled).toBe(false); | ||
|
||
timepickerNoMeridiem.setTime(9, 0); | ||
|
||
selectOption = minSelect.querySelector('option[value="30"]'); | ||
expect(selectOption.disabled).toBe(true); | ||
selectOption = minSelect.querySelector('option[value="31"]'); | ||
expect(selectOption.disabled).toBe(false); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ν
μ€νΈλ‘ 컀λ²νκ³ μ νλ λ²μκ° λ λͺ
ννμΌλ©΄ μ’κ² μ΅λλ€.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hourSelectκ° minSelect λλ€ κ°μ΄ κ²μ¦λμ΄μΌ νλ건κ°μ? λ§μ½ κ·Έκ² μλλΌλ©΄ λλμ΄μ κ²μ¦νλκ² μ’μ κ² κ°μ΅λλ€. κ·Έλ¦¬κ³ μκ°μ΄λ λΆμ λ²μ λ³λ‘ κ²μ¦( |
||
}); | ||
|
||
it('should disable a meridiem selector when range included in the other', function() { | ||
var start = makeRangeObj(6, 30); | ||
var end = makeRangeObj(11, 30); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
concat()
μ μ¬μ©ν μ΄μ κ°.. λ°°μ΄μ 볡μ¬νκΈ° μν μ©λλ‘ μ¬μ©λ κ²μΈκ°μ~?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
λ³΅μ¬ μ©λκ° λ§λ€λ©΄
concat()
보λ€λslice(0)
μ μ¬μ©νλ κ²μ΄ μ’μ κ² κ°μ΅λλ€.concat()
μ λ°°μ΄μ μ°κ²°νλ λͺ©μ μ ν¨μμ΄κΈ° νμ¬ μ¬μ© μλμλ λ§μ§ μμ보μ¬μ~There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
λ€λ₯Έ μ½λμμ μ λ κ² μ¬μ©νλ κ²μ λ³΄κ³ λ°°μ΄ λ³΅μ¬ μ
concat()
μ μ¬μ©νλ κ²μΌλ‘ μ€ν΄νμ΅λλ€.λ°°μ΄ λ³΅μ¬λ₯Ό λͺ©μ μΌλ‘ νλ ꡬ문μμλ
slice(0)
λ₯Ό μ¬μ©νλ κ²μΌλ‘ μμ νκ² μ΅λλ€!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μ°Έκ³ λ‘ λ°°μ΄ μ 체 볡μ¬λ κ·Έλ₯
slice()
λ§ ν΄λ λΌμ