Please implement Calendar module in Skulpt.
I’m trying to build a Calendar app, and anytime I need to use functionality from the Calendar module, I have to make calls to the server side, which is sloooow.
Thanks
Please implement Calendar module in Skulpt.
I’m trying to build a Calendar app, and anytime I need to use functionality from the Calendar module, I have to make calls to the server side, which is sloooow.
Thanks
This probably doesn’t work, but I wonder whether it might be possible to pass a calendar.Calendar object from server to client side via a portable object container. I might give it a try later.
This has now been implemented
It should even support a few languages
>>> import calendar
>>> c = calendar.LocaleTextCalendar(firstweekday=0, locale="fr_FR")
>>> c.prmonth(2022, 1)
janvier 2022
lu ma me je ve sa di
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
If I run import calendar
in a module on the client side, I get the error:
ModuleNotFoundError: No module named 'calendar'
Do we need to do anything to get this to work now that it has been implemented in skulpt?
@Neeeco it should just work - I don’t see the error when I do the same thing. Maybe you need to do a hard refresh?
Or if still not working then a clone link will help.
Interesting, I’m only experiencing the issue in Microsoft Edge. If I open the IDE in Chrome, the calendar module works on the client side. However, if I open the same in Edge, then I get the error mentioned above.
That’s sounds like a browser cache issue. Have you tried clearing the cache for the page and reloading?
Thanks Anvil team!
I’ll check it out
For anyone struggling with hard refresh in Microsoft Edge in the future, just follow these steps:
Solved the problem for me.