test(date-range-picker): improve coverage and refactor #5732 (#7647) #7690
+686
−404
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.
Closes #7477
Authored-by: Plamena Miteva & Boris Penkov
Some additional enhancements to the
IgxDateRangePickerComponent
are included in this PR:The picker will now accumulate all errors and return them as one object during validation.
Also, in single input mode it will use only
displayFormat
for formatting the input's dates.Additionally, the picker's
displayValue
as well as its defaultplaceholder
(in single input mode) are governed by Angular'sgetLocaleDateFormat
andformatDate
. These two methods can fail if a user has defined alocale
setting, but has not registered it in their application via theregisterLocaleData
function. In this case the picker will now log warnings and will revert to the browser's locale settings while still adhering to the defineddisplayFormat
. If a user has not provided anydisplayFormat
, the picker has a default, constant format which will be used instead.Additional information (check all that apply):
Checklist:
feature/README.MD
updates for the feature docsREADME.MD
CHANGELOG.MD
updates for newly added functionalityng update
migrations for the breaking changes (migrations guidelines)