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

ng-model for the watch breaks on de-selecting dates #68

@dovtenenboim

Description

@dovtenenboim

When selecting multiple dates there's no issue whatsoever and it works perfectly. The issue I've run in to is when I then deselect a date the watch stops (as I can see by nothing outputting in console) and when I select dates again it the selected values don't output in console.

Seems there's an issue with the deselecting of dates that then caused the next selection to be prevented from registering in the watch? Obviously the expected behaviour is on deselect of a date it removed that date from the array.

    $scope.selectedDates = []; 
    //$scope.selectedDates.push(moment());

    $scope.$watch('selectedDates', function(value) {
      console.log('selectedDates', value);
    }, true);

angular.js version: 1.5.8
moment version: 2.10.6
moment-timezone.js version: 0.5.5
angular-multiple-date-picker version 2.0.7

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