angular icon indicating copy to clipboard operation
angular copied to clipboard

How can i use flatpickr from my app's node_modules rather than requesting it from formio cdn?

Open hamodi opened this issue 2 years ago • 3 comments

After upgrading to version 5.5.0-rc.10, whenever i use datetime field the flatpickr library is being dowloaded from https://cdn.form.io/flatpickr-formio/4.6.13-formio.1/l10n/flatpickr-en-US.js but it keeps returning 404. I need it to load from my app rather than the cdn.

Can anyone help me please?

Thank you!

hamodi avatar May 17 '23 12:05 hamodi

Hi @hamodi,

I use flatpicker installed in my app and set the this in global Window. So Form.io does not download the library.

`import flatpickr from 'flatpickr';

declare global { interface Window { Flatpickr:any; } } window.Flatpickr = flatpickr; `

I hope this helps. Thanks

henriquesoareslima avatar Jun 15 '23 17:06 henriquesoareslima

hi @henriquesoareslima,

Thank you for the reply! the problem is that after i do that, formio is still requestion from the cdn. It is written directly in the calendarWdiget.js

Screenshot 2023-07-13 at 5 34 17 PM

cah-mohammad-oujeil avatar Jul 13 '23 16:07 cah-mohammad-oujeil

@cah-mohammad-oujeil we've made some updates to the CDN is the latest 4.x and 5.x releases - does this still occur with a newer version?

brendanbond avatar Dec 06 '24 21:12 brendanbond