* Checks if a value is valid against the current date format of the DatePicker. * @public * @param value A value to be tested against the current date format
(value: string)
| 367 | * @param value A value to be tested against the current date format |
| 368 | */ |
| 369 | isValidValue(value: string): boolean { |
| 370 | const parts = this._splitValueByDelimiter(value).filter(str => str.trim() !== ""); |
| 371 | |
| 372 | if (parts.some(dateString => this._isRelativeValue(dateString, this.getValueFormat()))) { |
| 373 | return false; |
| 374 | } |
| 375 | |
| 376 | return parts.length <= 2 && parts.every(dateString => super.isValidValue(dateString)); // must be at most 2 dates and each must be valid |
| 377 | } |
| 378 | |
| 379 | /** |
| 380 | * Checks if a value is valid against the current date format of the DatePicker. |
no test coverage detected