Flow: Grid header row and DatePicker causing error

Created on 25 Jun 2018  路  2Comments  路  Source: vaadin/flow

Description of the bug

I've tried to add DatePicker in grid header row, for filtering purposes, but when i did i got error "cannot read property 'input' of undefined" when i've opened app in browser (tested with chrome and edge).
10.0.0 (same happened in rc5)

Minimal reproducible example

image

Class Person has 3 fields (long id, String name, DateTime created)

Expected behavior

Opening app in browser without errors

Actual behavior

error

bug

All 2 comments

This is a bug with DatePicker that is initialised too early with the locale and gets a undefined for this.$ for vaadin-date-picker.html when getting the input field.

Uncaught TypeError: Cannot read property 'input' of undefined
    at HTMLElement._input (vaadin-date-picker.html:290)
    at HTMLElement.get _inputElement [as _inputElement] (vaadin-date-picker-mixin.html:365)
    at HTMLElement.get _inputValue [as _inputValue] (vaadin-date-picker.html:298)
    at updateFormat (VM2166 datepickerConnector.js:49)
    at Object.datepicker.$connector.setLocale (VM2166 datepickerConnector.js:119)

Fixed via https://github.com/vaadin/vaadin-date-picker-flow/pull/118 (and cherry-picked to the 1.0 branch via https://github.com/vaadin/vaadin-date-picker-flow/issues/119 )

Was this page helpful?
0 / 5 - 0 ratings