Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

feat(datepicker): disable today button if invalid #4199

Closed

Conversation

wesleycho
Copy link
Contributor

  • Disable today button if current date is before min-date or after
    max-date

This can be seen in action here.

This resolves #3988.

@wesleycho wesleycho added this to the 0.13.4 (Performance) milestone Aug 13, 2015
- Disable today button if current date is before `min-date` or after
  `max-date`
@wesleycho wesleycho force-pushed the feat/datepicker-disable-today branch from 1f39227 to 0a42b70 Compare August 13, 2015 14:26
@Foxandxss
Copy link
Contributor

I see the code, but I don't see it working on the plunker. I toggle the minDate but "today" can be clicked.

In this type of plunker (where you have lot of buttons and widgets, could be good if you add some instructions at the top of the plunker to reproduce it. I am probably clicking the wrong buttons I guess.

@wesleycho
Copy link
Contributor Author

minDate is already toggled by default - toggling the button disables the minDate.

@Foxandxss
Copy link
Contributor

But if I click another date and I click today, it moves. Shouldn't it be disabled?

@wesleycho
Copy link
Contributor Author

I'm not seeing that behavior - the today button should only be enabled (in the popup mind you) if minDate is enabled in my example. I updated it to strip out any distractors.

@Foxandxss
Copy link
Contributor

Ah, I was checking the other today button with the inline calendar.

👍 for me then.

@wesleycho wesleycho closed this in 71e0b8a Aug 14, 2015
@wesleycho wesleycho deleted the feat/datepicker-disable-today branch August 14, 2015 19:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Datepicker today option is enabled if today's date is outside of max-date/min-date range
2 participants