Boostrap Datepicker performance issue with large number of date input elements
I need to initialize a large amount of dynamically generated input datepicker
in the UI, but I only got poor performance and even crashing browsers. I dynamically create more than 10 input fields (10 to 100), after which I call the plugin initialization. At this point, everything starts to lag behind and even falls.
I am using this bootstrap-datepicker bootstrap plugin Does anyone have any idea how to get this to work fine. Maybe the idea is from a different approach.
+3
lobuljen
source
to share
1 answer
You can initialize an element when it has focus:
$('.date-picker').focusin(function () {
$(this).datepicker();
});
+3
Loqman
source
to share