Has anyone gotten any external calendar libraries to work with Retool? Just need to check dates against a list of holidays. I have been trying to connect https://unpkg.com/browse/date-holidays@3.16.13/dist/umd.min.js but have so far been unsuccessful as it seems to contain 'require'.
Hey @paul.narup!
The following url seems to work: https://cdn.jsdelivr.net/npm/date-holidays@3.16.13/dist/umd.min.js
Can you let me know if that works for you as well?
Hi Kabirdas, just seeing this now but I can confirm that it works. Thanks
Hi, I'm new to javascript. How would you connect to that data source you listed to get the US holidays? I've added your code into Run JS Code resource but I'm getting an error that "Holidays is not defined".
Hi @adrquint! I hope you're enjoying your JavaScript journey thus far.
By default Retool will import certain JS libraries but additionally allows users to specify and load other libraries - like the date-holidays library, in this case. To do this, open up your "App settings" -> "Libraries" menu and add the following: https://cdn.jsdelivr.net/npm/date-holidays@3.23.12/dist/umd.min.js
. Note that this is a more recent version than the one linked above, but the syntax for utilizing it should be the same.
Most libraries have a CDN link like this if you ever want to import another JS library. Have fun building!