diff --git a/src/BootstrapBlazor/Components/DateTimePicker/DateTimePicker.razor.js b/src/BootstrapBlazor/Components/DateTimePicker/DateTimePicker.razor.js index f98b7dc7712..964cc685568 100644 --- a/src/BootstrapBlazor/Components/DateTimePicker/DateTimePicker.razor.js +++ b/src/BootstrapBlazor/Components/DateTimePicker/DateTimePicker.razor.js @@ -1,5 +1,4 @@ import Data from "../../modules/data.js" -import EventHandler from "../../modules/event-handler.js" import Popover from "../../modules/base-popover.js" export function init(id, invoke, options) { @@ -8,7 +7,6 @@ export function init(id, invoke, options) { return } - const dismissSelector = el.getAttribute("data-bb-dismiss") const popover = Popover.init(el, { dropdownSelector: el.getAttribute('data-bb-dropdown'), isDisabled: () => { @@ -20,16 +18,9 @@ export function init(id, invoke, options) { }); const dateTimePicker = { el, - dismissSelector, popover } Data.set(id, dateTimePicker) - - if (dismissSelector) { - EventHandler.on(popover.toggleMenu, 'click', dismissSelector, () => { - popover.hide() - }) - } } export function hide(id) { @@ -44,9 +35,6 @@ export function dispose(id) { Data.remove(id) if (data) { - if (data.dismissSelector) { - EventHandler.off(data.popover.toggleMenu, 'click', data.dismissSelector) - } Popover.dispose(data.popover) } }