Skip to content

Define different styling for hours/minutes outside min and max values #3978

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

Closed
Lipata opened this issue Feb 22, 2019 · 7 comments · Fixed by #7347
Closed

Define different styling for hours/minutes outside min and max values #3978

Lipata opened this issue Feb 22, 2019 · 7 comments · Fixed by #7347
Assignees
Labels
📈 enhancement 🕐 time-picker severity: low size: L version: 8.2.x version: 9.0.x ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.

Comments

@Lipata
Copy link
Member

Lipata commented Feb 22, 2019

Is your feature request related to a problem? Please describe.

When there is a minValue and maxValue defined in the igx-time-picker, there is no indication and it is not possible to close the dialog, when trying to set a date that is outside the defined minimum or maximum.

Describe the solution you'd like

The igx-time-picker should have some disabled styling for the hours/minutes that are outside the minValue/maxValue.

@StefanIvanov
Copy link
Contributor

StefanIvanov commented Apr 1, 2019

We initially thought to react to such conditions with a validation error, but @Lipata makes a good and strong point that for the case of the time picker I 100% agree with. If min or max or both are set all values that don't belong to the selectable range should be disabled.

@StefanIvanov
Copy link
Contributor

Let's use the same color that is used for the date picker to disable certain dates (date-disabled-text-color)

@simeonoff simeonoff added version: 8.2.x version: 9.0.x 🛠️ status: in-development Issues and PRs with active development on them ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged. and removed version: 7.2.x 🆕 status: new 🛠️ status: in-development Issues and PRs with active development on them labels Jan 13, 2020
@valadzhov
Copy link
Collaborator

valadzhov commented May 15, 2020

@StefanIvanov a draft PR has been created for this issue which turned out to be regarded as a feature. The initial approach was to just apply the disabled style to the but this way the style wouldn't be applied dynamically to the hour, minute, second and AM/PM items when they were being changed by the user while still in the drop-down. Instead new logic was implemented to determine whether the value which was still in the drop-down was in the range of the min/maxValue. What was achieved with this is that if the minValue is 9:40 AM and maxValue is 11:20 AM when the user selects 10 as the hour all the items for the minutes would be available for selection but if the user selects 9 or 11 as the hour only the items for minutes which fall under the range of the minValue and maxValue would be available, the rest would be has the new disabled style.
Can you review this behaviour and give your comments, please.

Since this work item is now treated as a feature the efforts for its implementation will resume after 9.1.x

@Lipata Lipata removed the 🛠️ status: in-development Issues and PRs with active development on them label May 15, 2020
@StefanIvanov
Copy link
Contributor

I will review the behavior on the PR and provide feedback later today

@StefanIvanov
Copy link
Contributor

I am happy with the solution provided, feel free to assign me as a reviewer of the PR and I will approve it.

@radomirchev radomirchev added the 🛠️ status: in-development Issues and PRs with active development on them label Jun 26, 2020
valadzhov added a commit that referenced this issue Jul 3, 2020
@valadzhov valadzhov added ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged. and removed 🛠️ status: in-development Issues and PRs with active development on them labels Jul 7, 2020
valadzhov added a commit that referenced this issue Jul 13, 2020
Lipata pushed a commit that referenced this issue Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📈 enhancement 🕐 time-picker severity: low size: L version: 8.2.x version: 9.0.x ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.
Projects
None yet
9 participants