Skip to content

Commit

Permalink
STCOM-1110: Add correct validation of data (#1998)
Browse files Browse the repository at this point in the history
* STCOM-1110: Add correct validation of data

* STCOM-1110: Remove the useless comment

* STCOM-1110: Added changelog
  • Loading branch information
daniil-patckin committed Mar 9, 2023
1 parent b21a049 commit d08cf58
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -11,6 +11,7 @@
* Fix Convert24hr function of timepicker to fix 'invalid date' message when timedropdown is used. Refs STCOM-1120.
* Fix MCL Columnheaders' focus styling. Refs STCOM-1105.
* Fix keyboard interaction with MCL Columnheaders - Enter and Spacebar can now be used to 'click' them. Refs STCOM-680.
* The Datepicker works correctly with an invalid date. Refs STCOM-1110.
* Implement timeZone support in `<Timepicker/>` default output formatter. Refs STCOM-1128.

## [11.0.0](https://github.com/folio-org/stripes-components/tree/v11.0.0) (2023-01-30)
Expand Down
3 changes: 2 additions & 1 deletion lib/Datepicker/Datepicker.js
Expand Up @@ -259,9 +259,10 @@ const Datepicker = (
return dates;
}
return {};
} else if (value !== datePair.dateString) { // if the date's not valid, we just update the datestring...
} else if (value !== datePair.dateString) {
dates = {
dateString: value,
formatted: ''
};
updateDatePair(current => {
const newDatePair = Object.assign(current, dates);
Expand Down

0 comments on commit d08cf58

Please sign in to comment.