-
Notifications
You must be signed in to change notification settings - Fork 160
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
Comments
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. |
Let's use the same color that is used for the date picker to disable certain dates (date-disabled-text-color) |
@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. Since this work item is now treated as a feature the efforts for its implementation will resume after 9.1.x |
I will review the behavior on the PR and provide feedback later today |
I am happy with the solution provided, feel free to assign me as a reviewer of the PR and I will approve it. |
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.
The text was updated successfully, but these errors were encountered: