This was happening because scripts injected inside $(document).ready(...) would delay onload event and django's DateTimeShortcuts script attaches an event handler to load event to initialize the widgets. What would happen is our own initialization would run first and the one coming from django second resulting in duplicate widget. This change ensures our initialization happens last.
This was happening because scripts injected inside
$(document).ready(...)
would delay onload event and django's DateTimeShortcuts script attaches an event handler toload
event to initialize the widgets. What would happen is our own initialization would run first and the one coming from django second resulting in duplicate widget. This change ensures our initialization happens last.See #128