-
Notifications
You must be signed in to change notification settings - Fork 10
Add editable date range input #1733
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
Draft
ddaribo
wants to merge
13
commits into
master
Choose a base branch
from
bpachilova/range-editable-date-input
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
18aef58
poc editable date range input
ddaribo ee9d1fc
Merge branch 'master' into bpachilova/range-editable-date-input
ddaribo 8870280
Merge branch 'master' into bpachilova/range-editable-date-input
ddaribo 773dc52
feat(drp): handle the alt + arrow down/up focus properly for single i…
ddaribo 73f897e
Merge branch 'master' into bpachilova/range-editable-date-input
rkaraivanov cb12b8a
Merge branch 'master' into bpachilova/range-editable-date-input
rkaraivanov 5ee269f
Merge branch 'master' into bpachilova/range-editable-date-input
ddaribo cb41172
Merge branch 'master' into bpachilova/range-editable-date-input
ddaribo 2b29c4a
Merge branch 'master' into bpachilova/range-editable-date-input
ddaribo 7ca2d82
Merge branch 'master' into bpachilova/range-editable-date-input
ddaribo 3a366f7
Merge branch 'master' into bpachilova/range-editable-date-input
ddaribo c8c3a68
Merge branch 'master' into bpachilova/range-editable-date-input & get…
ddaribo adf7e14
Merge branch 'master' into bpachilova/range-editable-date-input
ddaribo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,8 @@ import { | |
| type ValidationContainerTestsParams, | ||
| ValidityHelpers, | ||
| } from '../common/validity-helpers.spec.js'; | ||
| import IgcInputComponent from '../input/input.js'; | ||
| import type IgcDateRangeInputComponentComponent from './date-range-input.js'; | ||
| import IgcDateRangeInputComponent from './date-range-input.js'; | ||
| import IgcDateRangePickerComponent, { | ||
| type DateRangeValue, | ||
| } from './date-range-picker.js'; | ||
|
|
@@ -21,7 +22,7 @@ describe('Date Range Picker Single Input - Form integration', () => { | |
| before(() => defineComponents(IgcDateRangePickerComponent)); | ||
|
|
||
| let picker: IgcDateRangePickerComponent; | ||
| let input: IgcInputComponent; | ||
| let input: IgcDateRangeInputComponentComponent; | ||
|
||
| let startKey = ''; | ||
| let endKey = ''; | ||
|
|
||
|
|
@@ -67,24 +68,26 @@ describe('Date Range Picker Single Input - Form integration', () => { | |
| await elementUpdated(spec.element); | ||
|
|
||
| input = picker.renderRoot.querySelector( | ||
| IgcInputComponent.tagName | ||
| ) as IgcInputComponent; | ||
| IgcDateRangeInputComponent.tagName | ||
| ) as IgcDateRangeInputComponent; | ||
|
|
||
| checkSelectedRange(spec.element, value, false); | ||
|
|
||
| spec.reset(); | ||
| await elementUpdated(spec.element); | ||
|
|
||
| expect(spec.element.value).to.deep.equal(initial); | ||
| expect(input.value).to.equal(''); | ||
| expect(input.value).to.deep.equal({ start: null, end: null }); | ||
| }); | ||
|
|
||
| it('should not be in invalid state on reset for a required control which previously had value', () => { | ||
| spec.setProperties({ value: value }); | ||
| spec.setProperties({ required: true }); | ||
|
|
||
| spec.assertSubmitPasses(); | ||
| const input = picker.renderRoot.querySelector(IgcInputComponent.tagName)!; | ||
| const input = picker.renderRoot.querySelector( | ||
| IgcDateRangeInputComponent.tagName | ||
| )!; | ||
| expect(input.invalid).to.be.false; | ||
|
|
||
| spec.setProperties({ value: null }); | ||
|
|
@@ -100,7 +103,7 @@ describe('Date Range Picker Single Input - Form integration', () => { | |
| spec.assertSubmitFails(); | ||
| await elementUpdated(spec.element); | ||
| const input = spec.element.renderRoot.querySelector( | ||
| IgcInputComponent.tagName | ||
| IgcDateRangeInputComponent.tagName | ||
| )!; | ||
| expect(input.invalid).to.be.true; | ||
|
|
||
|
|
@@ -118,10 +121,10 @@ describe('Date Range Picker Single Input - Form integration', () => { | |
| await elementUpdated(spec.element); | ||
|
|
||
| input = spec.element.renderRoot.querySelector( | ||
| IgcInputComponent.tagName | ||
| ) as IgcInputComponent; | ||
| IgcDateRangeInputComponent.tagName | ||
| ) as IgcDateRangeInputComponent; | ||
|
|
||
| expect(input.value).to.equal(''); | ||
| expect(input.value).to.deep.equal({ start: null, end: null }); | ||
|
|
||
| spec.reset(); | ||
| await elementUpdated(spec.element); | ||
|
|
@@ -146,7 +149,7 @@ describe('Date Range Picker Single Input - Form integration', () => { | |
| spec.assertSubmitFails(); | ||
| await elementUpdated(spec.element); | ||
| const input = spec.element.renderRoot.querySelector( | ||
| IgcInputComponent.tagName | ||
| IgcDateRangeInputComponent.tagName | ||
| )!; | ||
| expect(input.invalid).to.be.true; | ||
|
|
||
|
|
@@ -162,7 +165,7 @@ describe('Date Range Picker Single Input - Form integration', () => { | |
| spec.assertSubmitPasses(); | ||
| await elementUpdated(spec.element); | ||
| const input = spec.element.renderRoot.querySelector( | ||
| IgcInputComponent.tagName | ||
| IgcDateRangeInputComponent.tagName | ||
| )!; | ||
| expect(input.invalid).to.be.false; | ||
|
|
||
|
|
@@ -205,7 +208,7 @@ describe('Date Range Picker Single Input - Form integration', () => { | |
| spec.assertSubmitPasses(); | ||
| await elementUpdated(spec.element); | ||
| const input = spec.element.renderRoot.querySelector( | ||
| IgcInputComponent.tagName | ||
| IgcDateRangeInputComponent.tagName | ||
| )!; | ||
| expect(input.invalid).to.be.false; | ||
|
|
||
|
|
@@ -246,7 +249,7 @@ describe('Date Range Picker Single Input - Form integration', () => { | |
| spec.assertSubmitPasses(); | ||
| await elementUpdated(spec.element); | ||
| const input = spec.element.renderRoot.querySelector( | ||
| IgcInputComponent.tagName | ||
| IgcDateRangeInputComponent.tagName | ||
| )!; | ||
| expect(input.invalid).to.be.false; | ||
|
|
||
|
|
@@ -279,7 +282,7 @@ describe('Date Range Picker Single Input - Form integration', () => { | |
| spec.assertSubmitPasses(); | ||
| await elementUpdated(spec.element); | ||
| const input = spec.element.renderRoot.querySelector( | ||
| IgcInputComponent.tagName | ||
| IgcDateRangeInputComponent.tagName | ||
| )!; | ||
| expect(input.invalid).to.be.false; | ||
|
|
||
|
|
@@ -323,7 +326,7 @@ describe('Date Range Picker Single Input - Form integration', () => { | |
| spec.assertSubmitFails(); | ||
| await elementUpdated(spec.element); | ||
| const input = spec.element.renderRoot.querySelector( | ||
| IgcInputComponent.tagName | ||
| IgcDateRangeInputComponent.tagName | ||
| )!; | ||
| expect(input.invalid).to.be.true; | ||
|
|
||
|
|
@@ -383,7 +386,7 @@ describe('Date Range Picker Single Input - Form integration', () => { | |
| spec.assertSubmitFails(); | ||
| await elementUpdated(spec.element); | ||
| const input = spec.element.renderRoot.querySelector( | ||
| IgcInputComponent.tagName | ||
| IgcDateRangeInputComponent.tagName | ||
| )!; | ||
| expect(input.invalid).to.be.true; | ||
|
|
||
|
|
@@ -416,8 +419,8 @@ describe('Date Range Picker Single Input - Form integration', () => { | |
| html`<igc-date-range-picker required></igc-date-range-picker>` | ||
| ); | ||
| const input = picker.renderRoot.querySelector( | ||
| IgcInputComponent.tagName | ||
| ) as IgcInputComponent; | ||
| IgcDateRangeInputComponent.tagName | ||
| ) as IgcDateRangeInputComponent; | ||
|
|
||
| expect(picker.invalid).to.be.false; | ||
| expect(input.invalid).to.be.false; | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Type name has a duplicate "Component" suffix. Should be
IgcDateRangeInputComponentinstead ofIgcDateRangeInputComponentComponent.