ngMaterialDateRangePicker does not update the model

Asked

Viewed 26 times

0

I am trying to use ngMaterial’s date range Picker, but without success.. for some reason it is not updating the model. I made the call on JS:

angular.module('events-create',
    [
        'ngMaterial',
        'ngAria',
        'ngMaterialDateRangePicker'
    ])

And in html:

<md-date-range
    ng-model="vm.model.startsAt"
    auto-confirm="true"
    show-template="false"
    one-panel="true">
 </md-date-range>

vm.model.startsAt keeps showing up as null for me.

Angularjs 1.5.11

Any idea? (if you have any idea how to better detail the question, I accept.)

1 answer

0

Solved! I needed to declare the field model that will receive the calendar as an object, so that, selecting the dates, the model is updated.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.