Skip to content
This repository was archived by the owner on Jun 5, 2020. It is now read-only.
This repository was archived by the owner on Jun 5, 2020. It is now read-only.

Slow when select() on datepicker with markers. #48

@Jaspur

Description

@Jaspur

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions