diff --git a/CHANGELOG.md b/CHANGELOG.md index b5584d7..2b4f04d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -809,3 +809,16 @@ ### Features * Peer dependencies removed from the package.json file. + + +# 0.11.1 (2021-04-11) + +### Bug Fixes + +* Fixed bug: [Date & Month defaulting to current month and Date #79](https://github.com/kekeh/angular-mydatepicker/issues/79) + +### Features + +* none + + diff --git a/package.json b/package.json index 433d157..e29c853 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-mydatepicker-example", - "version": "0.11.0", + "version": "0.11.1", "description": "Angular datepicker and date range picker", "homepage": "https://kekeh.github.io/angular-mydatepicker/", "keywords": [ diff --git a/projects/angular-mydatepicker/package.json b/projects/angular-mydatepicker/package.json index 6f2d548..002888c 100644 --- a/projects/angular-mydatepicker/package.json +++ b/projects/angular-mydatepicker/package.json @@ -1,6 +1,6 @@ { "name": "angular-mydatepicker", - "version": "0.11.0", + "version": "0.11.1", "description": "Angular datepicker and date range picker", "homepage": "https://kekeh.github.io/angular-mydatepicker/", "keywords": [ diff --git a/projects/angular-mydatepicker/src/lib/services/angular-mydatepicker.util.service.ts b/projects/angular-mydatepicker/src/lib/services/angular-mydatepicker.util.service.ts index 13e9d75..1713ac8 100644 --- a/projects/angular-mydatepicker/src/lib/services/angular-mydatepicker.util.service.ts +++ b/projects/angular-mydatepicker/src/lib/services/angular-mydatepicker.util.service.ts @@ -50,6 +50,10 @@ export class UtilService { } } + if (year === 0 || month === 0 || day === 0) { + return returnDate; + } + const {validateDisabledDates, selectedValue} = validateOpts; year = year === 0 && selectedValue ? selectedValue.year : year;