Skip to content

Commit

Permalink
Fixed bug: Date & Month defaulting to current month and Date #79
Browse files Browse the repository at this point in the history
  • Loading branch information
kekeh committed Apr 11, 2021
1 parent 28f9f9f commit 6c9a2cc
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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


2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-mydatepicker/package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6c9a2cc

Please sign in to comment.