Fix to "Cannot read property 'destroy' of null" error on removing element containing datepicker

Fixed issue with error 'Cannot read property 'destroy' of null' being thrown in the console if a date picker was inside an accordion or popover that closed