| 411 | static i18nBundle: I18nBundle; |
| 412 | |
| 413 | get formValidityMessage() { |
| 414 | const validity = this.formValidity; |
| 415 | |
| 416 | if (validity.valueMissing) { |
| 417 | // @ts-ignore oFormatOptions is a private API of DateFormat |
| 418 | return DatePicker.i18nBundle.getText(DATEPICKER_VALUE_MISSING, this.getFormat().oFormatOptions.pattern as string); |
| 419 | } |
| 420 | if (validity.patternMismatch) { |
| 421 | // @ts-ignore oFormatOptions is a private API of DateFormat |
| 422 | return DatePicker.i18nBundle.getText(DATEPICKER_PATTERN_MISSMATCH, this.getFormat().oFormatOptions.pattern as string); |
| 423 | } |
| 424 | if (validity.rangeUnderflow) { |
| 425 | return DatePicker.i18nBundle.getText(DATEPICKER_RANGE_UNDERFLOW, this.minDate); |
| 426 | } |
| 427 | if (validity.rangeOverflow) { |
| 428 | return DatePicker.i18nBundle.getText(DATEPICKER_RANGE_OVERFLOW, this.maxDate); |
| 429 | } |
| 430 | |
| 431 | return ""; |
| 432 | } |
| 433 | |
| 434 | get formValidity(): ValidityStateFlags { |
| 435 | return { |