Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar is Very Slow on heavy dom document! #130

Open
beshoo opened this issue Oct 24, 2018 · 3 comments
Open

Calendar is Very Slow on heavy dom document! #130

beshoo opened this issue Oct 24, 2018 · 3 comments

Comments

@beshoo
Copy link

beshoo commented Oct 24, 2018

Dear All, Thank you for this add on

First of all this is how i create the calendar

var today = new Date();
$('.upload_time').calendar({minDate: new Date(today.getFullYear(), today.getMonth(), today.getDate()),
           disableMinute: true,
           popupOptions: {
           position: 'top center',
          delay: {
           show: 0,
          hide: 0
           },
     lastResort: 'top center',
     prefer: 'opposite',
     preserve: true,
     on:'hover',
     hideOnScroll: false
   },
             formatter: {
               date: function (date, settings) {
                 if (!date) return '';
                 var day = date.getDate();
                 var month = date.getMonth() + 1;
                 var year = date.getFullYear();
                 return day + '/' + month + '/' + year;
               }
             }});

Now when i load the document i note that it hit
https://github.com/mdehoog/Semantic-UI-Calendar/blob/master/dist/calendar.js#L80
1 Times. which is fine, Clander loaded into the DOM.

Now when i click on the input box ".upload_time" again it calls like this:

refresh

refresh
calendar.min.js:176 create Call
calendar.min.js:667 refresh
calendar.min.js:176 create Call
calendar.min.js:667 refresh
calendar.min.js:176 create Call
calendar.min.js:667 refresh
calendar.min.js:176 create Call

Which it delay the load of the Calendar.
I am not talking about selecting Day and Date. which i can understand we need to call a function to render new stuff.

But why there is a lot of calls to create and refresh while the calendar is already created!

@parth-kotecha
Copy link

Were you able to find a solution for this somehow ?? I am also facing this same issue

@lubber-de
Copy link

We finally fixed this in Fomantic-UI where the calendar module was merged into
See testcases here fomantic/Fomantic-UI#1531

@beshoo
Copy link
Author

beshoo commented Jun 22, 2020

2 years.... Waw I almost forgot about it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants