File tree 2 files changed +6
-1
lines changed
formset/templates/formset/default/widgets 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -495,6 +495,11 @@ class DateTimeField extends Widget {
495
495
}
496
496
497
497
public initialize ( ) {
498
+ if ( this . calendar ) {
499
+ // to prevent flickering when loading the page, the popup dialog is hidden
500
+ this . calendar . element . style . visibility = '' ;
501
+ }
502
+
498
503
// some styles change when switching light/dark mode, so we need to update them
499
504
StyleHelpers . pushMediaQueryStyles ( [ [
500
505
this . styleSheet ,
Original file line number Diff line number Diff line change 1
1
{% include "django/forms/widgets/input.html" %}
2
2
{% if calendar %}
3
- < div role ="dialog " class ="dj-calendar " aria-label ="calendar ">
3
+ < div role ="dialog " class ="dj-calendar " aria-label ="calendar " style =" visibility: hidden; " >
4
4
{% include calendar.template %}
5
5
</ div >
6
6
{% endif %}
You can’t perform that action at this time.
0 commit comments