* Checks if a date string is a relative date (e.g. "today", "tomorrow") * that would be resolved by DateFormat.parseRelative(). * Relative dates are not supported in DateRangePicker. * @private
(dateString: string, format: DateFormat)
| 166 | * @private |
| 167 | */ |
| 168 | _isRelativeValue(dateString: string, format: DateFormat): boolean { |
| 169 | const trimmed = dateString.trim(); |
| 170 | if (!trimmed) { |
| 171 | return false; |
| 172 | } |
| 173 | |
| 174 | const parsed = format.parse(trimmed); |
| 175 | if (!parsed) { |
| 176 | return false; |
| 177 | } |
| 178 | |
| 179 | const formatted = format.format(parsed); |
| 180 | return formatted !== trimmed; |
| 181 | } |
| 182 | |
| 183 | /** |
| 184 | * **Note:** The getter method is inherited and not supported. If called it will return an empty value. |
no test coverage detected