Skip to content

Giving error isValid undefined #306

@BMK91

Description

@BMK91

Hi,

When setting pre-date values with min, max it gives error

angular.js:15018 TypeError: a.startDate.isValid is not a function
at f.$validators.invalid (angular-daterangepicker.js:266)

vm.dateRange = {
            "startDate": moment().toDate(),
            "endDate"  : moment().toDate()
        };

        vm.minDate = moment().subtract(2, "d").toDate();
        vm.maxDate = moment().add(2, "d").toDate();

Here is the screenshot of console debug.

test
Bower

"jquery": "2.1.1",
"angular": "1.7.2",
"moment": "^2.24.0",
"bootstrap-daterangepicker": "^3.0.3"
"angular-daterangepicker": "^0.3.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