greatCodeIdeas / md-date-range-picker

Angular Material Date Range Picker Service/Directive
MIT License
62 stars 40 forks source link

Illegal Invocation Typeerror #42

Closed vishnu-vv closed 6 years ago

vishnu-vv commented 6 years ago
screen shot 2017-11-21 at 4 40 23 pm
$scope.pick = function($event, showTemplate) {
            console.log('Button Fired!');
            $scope.selectedRange.showTemplate = showTemplate;
            $mdDateRangePicker.show({
                targetEvent: $event,
                model: $scope.selectedRange
            }).then(function(result) {
                if (result) $scope.selectedRange = result;
            })
        };

I think you should remove the property targetEvent: $event from the object, it worked for me.