Datepicker of angled material does not work

0

I'm using Angular Material in a project and need to collect the user's date of birth in the registry, I'm trying to use Datepicker of Material , but the field does not even appear on the screen. Am I doing what's wrong?

HTML:

<div layout-gt-xs="row">
    <div flex-gt-xs>
        <label>Data de nascimento</label>
        <md-datepicker ng-model="birth" md-placeholder="Data de nascimento"></md-datepicker>
    </div>
</div>

JavaScript:

$scope.user.birth = new Date();

$scope.minDate = new Date(
    $scope.birth.getFullYear(),
    $scope.birth.getMonth() - 2,
    $scope.birth.getDate());

$scope.maxDate = new Date(
    $scope.birth.getFullYear(),
    $scope.birth.getMonth() + 2,
    $scope.birth.getDate());

$scope.onlyWeekendsPredicate = function(date) {
    var day = date.getDay();
    return day === 0 || day === 6;
};
    
asked by anonymous 12.09.2016 / 13:24

1 answer

4

I managed to resolve. In my case I was using a wrong version of material , follow the imports I made:

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/angular_material/0.11.1/angular-material.min.css">

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angular_material/0.11.1/angular-material.min.js"></script>
    
12.09.2016 / 15:31