Using material datepicker, inside dropdown menus,
When a date is selected dropdown closes, how to avoid it?
THanks
At first, you should add attribute (data-kt-menu-self-trigger) into your trigger element
<button type="button" class="btn btn-secondary btn-sm show menu-dropdown" data-kt-menu-trigger="click" data-kt-menu-placement="bottom-end" data-kt-menu-self-trigger="true">Show</button>
KTMenu.initHandlers = function() {
in components/menu.js and place the code below after if (menuObj && menuObj.getItemSubType(item) === "dropdown") {
if (!item.contains(e.target) && menuObj.getTriggerElement().getAttribute("data-kt-menu-self-trigger") ) {
continue;
}
Hi,
Sorry for the late response.
Try to check the attribute: data-kt-menu-trigger
, the value has to be hover
, cause with click
it will close himself then.
Regards,
Keenthemes support