Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

<fix(datepicker)>: change mdDateUtil.isDateWithinRange to ignore the … #6888

Closed
wants to merge 1 commit into from

Conversation

ademuri
Copy link
Contributor

@ademuri ademuri commented Jan 27, 2016

…time component of the date

Previously, mdDateUtil.isDateWithinRange did a simple comparison on the given dates. Since this
component is used for dates (and not times or datetimes), this leads to inconsistent behavior.

Fixes #6887

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

1 similar comment
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@googlebot
Copy link

CLAs look good, thanks!

1 similar comment
@googlebot
Copy link

CLAs look good, thanks!

@ThomasBurleson
Copy link
Contributor

@jelbourn - can you review ?

@ThomasBurleson ThomasBurleson added the needs: review This PR is waiting on review from the team label Jan 27, 2016
return (!angular.isDate(minDate) || minDate <= date) &&
(!angular.isDate(maxDate) || maxDate >= date);
var dateAtMidnight = createDateAtMidnight(date);
var minDateAtMidnight = angular.isDate(minDate) ? createDateAtMidnight(minDate) : null;
Copy link
Member

Choose a reason for hiding this comment

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

Instead of angular.isDate, use isValidDate

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@jelbourn
Copy link
Member

LGTM aside from one comment. Great contribution, thanks!

…time component of the date

Previously, mdDateUtil.isDateWithinRange did a simple comparison on the given dates. Since this
component is used for dates (and not times or datetimes), this leads to inconsistent behavior.

Fixes angular#6887
@ademuri
Copy link
Contributor Author

ademuri commented Jan 28, 2016

PTAL

@jelbourn jelbourn added pr: merge ready This PR is ready for a caretaker to review and removed needs: review This PR is waiting on review from the team labels Jan 28, 2016
@jelbourn jelbourn closed this in e1c07ec Jan 28, 2016
ErinCoughlan pushed a commit to ErinCoughlan/material that referenced this pull request Feb 9, 2016
…me component of the date

Previously, mdDateUtil.isDateWithinRange did a simple comparison on the given dates. Since this
component is used for dates (and not times or datetimes), this leads to inconsistent behavior.

Fixes angular#6887

Closes angular#6888
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr: merge ready This PR is ready for a caretaker to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants