Hello,
I’m encountering one error that I’m not sure if you’ve seen before. In my app, I have a dropdown that uses the option to render the date picker or the date range picker. If the option selected from the dropdown is requiring as input only one date, then I render the date picker. If the option selected from the dropdown requires two dates for a date range, I render the date range picker.
The error I encounter is when I switch from date picker to date range picker is "Error in mounted hook: "TypeError: Cannot read property 'insertBefore' of null"".
The error comes from the DateRangePickerComponent, and it has mentions of the error at:
- Object.createInput
- DateRangePicker.createInput
- DateRangePicker.initialize
- DateRangePicker.render
- DateRangePicker.Component.appendTo
- VueComponent.ComponentBase.mounted
This is the code block that determines which date picker to render based on value type:
Date: {
default: {
is: 'DatePickerComponent',
placeholder: 'Enter date',
cssClass: 'date-picker-component'
},
range: {
is: 'DateRangePickerComponent',
placeholder: 'Enter date range',
cssClass: 'date-picker-component'
}