angular-mighty-datepicker icon indicating copy to clipboard operation
angular-mighty-datepicker copied to clipboard

Slow when select() on datepicker with markers.

Open Jaspur opened this issue 8 years ago • 1 comments

The calendar is very slow when there are markers added ánd you wanna select some dates. Pretty basis, but only tweaked the template. The select() is unchanged and this is causing slowness.

<mighty-datepicker markers="markers" ng-model="selected_dates" options="calendar_options">
</mighty-datepicker>

This options:

$scope.calendar_options = {
        callback: _callback_prices,
        months: 3,
        mode: 'multiple',
        start: moment().startOf('year'),
        end: moment().endOf('year'),
        before: moment().endOf('year'),
        filter: _filter,
        markerTemplate: null,
        template: "Tweaked template",
    };

With this Markers added:

angular.forEach(foobar, function(value, key) {
    $scope.markers.push({
        day: moment(value.date),
        marker: value.text,
    });
});

See video: https://www.dropbox.com/s/hrq0ttxwd9sacv8/slow.mov?dl=0

Jaspur avatar Feb 28 '17 21:02 Jaspur

Do you know a fix or workaround, @jandudulski ?

Jaspur avatar Mar 20 '17 13:03 Jaspur