[TimePicker] Support validating `disablePast` and `disableFuture`
Fixes #4868
Add disablePast and disableFuture prop handling to timeValidation and clock picker disabled time calculation.
These are the results for the performance tests:
| Test case | Unit | Min | Max | Median | Mean | σ |
|---|---|---|---|---|---|---|
| Filter 100k rows | ms | 516.9 | 886.6 | 766.3 | 705.02 | 157.451 |
| Sort 100k rows | ms | 610.9 | 1,388.2 | 1,388.2 | 1,102.36 | 285.642 |
| Select 100k rows | ms | 148.2 | 308.8 | 231 | 229.44 | 55.742 |
| Deselect 100k rows | ms | 177.1 | 357.1 | 184.7 | 218.86 | 69.387 |
Generated by :no_entry_sign: dangerJS against 44eb781b15bb3c2c04c4413830f42fc7df27b7f9
This pull request has conflicts, please resolve those before we can evaluate the pull request.
@flaviendelangle do you have an option on this PR?
Otherwise, I will merge after doing
-If `true` future selection is disabled.
+If `true` disable values after the current time.
-If `true` past selection is disabled.
+If `true` disable values before the current time
I'll try to review it today or tomorrow, if it is not blocking you for something else :+1:
+If `true` disable values after the current time.
I agree with this diff :+1:
I added the default value to disableFuture and disablePast for time pickers and reworked the typing of the validation quite a bit because it was becoming very hard to play with.
I will merge it after today's release