You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, thank you for maintaining and improving this library.
I encountered an issue in the admin panel. In my project, static files are served from a separate subdomain, which prevents the calendar icon image from loading correctly.
I noticed that in main.js (link to code), the url for the calendar icon is hardcoded, which causes the static url to be generated incorrectly.
For example, if the admin panel is hosted at:
admin.example.com
It tries to load the calendar icon from this url, which is incorrect:
Since django template tags cannot be used directly in css or js files, I had to override admin/base.html and save the icon path in a variable like this and use in main.js file:
However, this approach doesn’t seem suitable for a fix within the library itself.
An alternative approach might be to follow django style by using a <span> tag instead of an <img> tag (datepicker-cc.js) and defining the icon path in the css file:
Hi,
First, thank you for maintaining and improving this library.
I encountered an issue in the admin panel. In my project, static files are served from a separate subdomain, which prevents the calendar icon image from loading correctly.
I noticed that in
main.js
(link to code), the url for the calendar icon is hardcoded, which causes the static url to be generated incorrectly.For example, if the admin panel is hosted at:
It tries to load the calendar icon from this url, which is incorrect:
This issue arises when the static files are served from a different base url or subdomain.
Thanks.
Configurations
The text was updated successfully, but these errors were encountered: