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

42 lines (38 loc) 1.43 kB
angular.module('datepickerMomentJs', ['ngMaterial']) .config(function($mdDateLocaleProvider) { console.log(window.moment ? 'moment loaded' : 'not loaded'); //moment.locale('fr'); //$mdDateLocaleProvider.months = moment.months(); //$mdDateLocaleProvider.months = moment.monthsShort(); //$mdDateLocaleProvider.days = moment.weekdays(); //$mdDateLocaleProvider.shortDays = moment.weekdaysMin(); // //$mdDateLocaleProvider.parseDate = function(dateString) { // return moment(dateString).toDate(); //}; // //$mdDateLocaleProvider.formatDate = function(date) { // return moment(date).format('L'); //}; // //$mdDateLocaleProvider.longDateFormatter = function(date) { // return moment(date).format('LL'); //}; // //$mdDateLocaleProvider.monthHeaderFormatter = function(date) { // moment.monthsShort()[date.getMonth()] + ' ' + date.getFullYear(); //}; // //$mdDateLocaleProvider.weekNumberFormatter = function(weekNumber) { // return 'Semaine ' + weekNumber; //}; }) .controller('AppCtrl', function($scope) { $scope.myDate = new Date(); $scope.adjustMonth = function(delta) { $scope.myDate = new Date( $scope.myDate.getFullYear(), $scope.myDate.getMonth() + delta, $scope.myDate.getDate()); }; });