Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for issue 4755 #4977

Merged
merged 2 commits into from
Mar 5, 2018
Merged

Fix for issue 4755 #4977

merged 2 commits into from
Mar 5, 2018

Conversation

Aask
Copy link
Contributor

@Aask Aask commented Jan 26, 2018

A fix for the issue discussed in #4755.

A case where the previous code doesn´t work is if minDate currentMonth is January, i.e. 0.

###Defect Fixes
When submitting a PR, please also create an issue documenting the error.

###Feature Requests
Due to company policy, we are unable to accept feature request PRs with significant changes as such cases has to be implemented by our team following our own processes.
Smaller scaled feature implementations such as adding a property to a component will be considered for merging.

A fix for the issue discussed in primefaces#4755. 

A case where the previous code doesn´t work is if minDate currentMonth is January, i.e. 0.
@@ -352,7 +352,8 @@ export class Calendar implements AfterViewInit,AfterViewChecked,OnInit,OnDestroy

set minDate(date: Date) {
this._minDate = date;
if(this.currentMonth != null && this.currentYear) {

if(this.currentMonth != undefined && this.currentMonth != null && this.currentYear) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey guys,
I think (this.currentMonth && this.currentYear) result will be the same but more simplify this condition.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey
Not if this.currentMonth == 0 as it is in January?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Aask make sense, thanks!

@cagataycivici
Copy link
Member

Will fix it on our end, thanks.

@cagataycivici cagataycivici reopened this Mar 5, 2018
@cagataycivici cagataycivici self-assigned this Mar 5, 2018
@cagataycivici cagataycivici modified the milestone: 5.2.1 Mar 5, 2018
@cagataycivici cagataycivici merged commit 5fd1fd2 into primefaces:master Mar 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants