UNPKG

angular-material-npfixed

Version:

The Angular Material project is an implementation of Material Design in Angular.js. This project provides a set of reusable, well-tested, and accessible Material Design UI components. Angular Material is supported internally at Google by the Angular.js, M

21 lines (17 loc) 499 B
angular.module('datepickerValidations', ['ngMaterial', 'ngMessages']).controller('AppCtrl', function() { this.myDate = new Date(); this.minDate = new Date( this.myDate.getFullYear(), this.myDate.getMonth() - 2, this.myDate.getDate() ); this.maxDate = new Date( this.myDate.getFullYear(), this.myDate.getMonth() + 2, this.myDate.getDate() ); this.onlyWeekendsPredicate = function(date) { var day = date.getDay(); return day === 0 || day === 6; }; });