Function
isYearDisabled
(refYear: number, minParts?: DatetimeParts, maxParts?: DatetimeParts)
Source from the content-addressed store, hash-verified
| 12 | import { getNextMonth, getPreviousMonth } from './manipulation'; |
| 13 | |
| 14 | export const isYearDisabled = (refYear: number, minParts?: DatetimeParts, maxParts?: DatetimeParts) => { |
| 15 | if (minParts && minParts.year > refYear) { |
| 16 | return true; |
| 17 | } |
| 18 | |
| 19 | if (maxParts && maxParts.year < refYear) { |
| 20 | return true; |
| 21 | } |
| 22 | |
| 23 | return false; |
| 24 | }; |
| 25 | |
| 26 | /** |
| 27 | * Returns true if a given day should |
Tested by
no test coverage detected