Skip to content

Commit

Permalink
fix(date picker): minDate is now exclusive
Browse files Browse the repository at this point in the history
This PR makes minDate behaviour match maxDate, and allows the date provided in the option to be
selected.

BREAKING CHANGE: The date provided to the component via the minDate option is now selectable by
users. If you are using the mindate functionality, you will need to adjust the dates you pass into
the component to ensure the correct dates are included/excluded.

fix #923
  • Loading branch information
chrispymm committed Nov 15, 2024
1 parent 7e83b3f commit b16a5f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/moj/components/date-picker/date-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ Datepicker.prototype.setWeekStartDay = function () {
*
*/
Datepicker.prototype.isExcludedDate = function (date) {
if (this.minDate && this.minDate > date) {
if (this.minDate && this.minDate >= date) {
return true;
}

Expand Down

0 comments on commit b16a5f1

Please sign in to comment.