jcsmorais / shortcut-buttons-flatpickr

Flatpickr's plugin that provides users an alternative way to interact with the datetime picker.
MIT License
26 stars 15 forks source link

TypeError Angular14 #42

Open parksmart-dev opened 1 year ago

parksmart-dev commented 1 year ago

node_modules_ionic_core_dist_esm_ion-popover_entry_js.js:2 ERROR TypeError: (0 , shortcut_buttons_flatpickr_dist_types_index_d__WEBPACK_IMPORTED_MODULE_23__.ShortcutButtonsPlugin) is not a function at JobsPage.ionViewDidEnter (jobs.page.ts:187:30) at HTMLElement.handler (ionic-angular.js:2397:37) at _ZoneDelegate.invokeTask (zone.js:443:35) at Object.onInvokeTask (core.mjs:26218:33) at _ZoneDelegate.invokeTask (zone.js:442:64) at Zone.runTask (zone.js:214:51) at ZoneTask.invokeTask [as invoke] (zone.js:525:38) at invokeTask (zone.js:1727:22) at globalCallback (zone.js:1758:31) at HTMLElement.globalZoneAwareCallback

any help appreciated.

Importing as below,

import { ShortcutButtonsPlugin } from 'shortcut-buttons-flatpickr/dist/types/index.d';

WilZirkle commented 6 months ago

try this, it allows you to use the plugin but doesn't get the types so you get any issues. I saw your issue while looking for how to get the types to load. import ShortcutButtonsPlugin from 'shortcut-buttons-flatpickr';