From e300ca8511d2676c00e64fa3128b7b7b63e534de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B5=D0=BD=D0=B8=D1=81?= Date: Sun, 27 Aug 2017 15:52:24 +0300 Subject: [PATCH 1/6] Added overloading for main functions --- build/angular-mighty-datepicker.js | 21 +++++++++++---------- package.json | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/build/angular-mighty-datepicker.js b/build/angular-mighty-datepicker.js index fb4df3a..388d97d 100644 --- a/build/angular-mighty-datepicker.js +++ b/build/angular-mighty-datepicker.js @@ -23,11 +23,12 @@ after: '=', before: '=', rangeFrom: '=', + overloading: '=', rangeTo: '=' }, link: function($scope, $element, $attrs) { var _bake, _build, _buildMonth, _buildWeek, _getMarker, _indexMarkers, _indexOfMoment, _isInRange, _isSelected, _prepare, _setup, _withinLimits; - _bake = function() { + _bake = $scope.overloading.bake || function() { var domEl; domEl = $compile(angular.element($scope.options.template))($scope); return $element.append(domEl); @@ -42,7 +43,7 @@ } return -1; }; - _indexMarkers = function() { + _indexMarkers = $scope.overloading.indexMarkers || function() { var marker; if ($scope.markers) { return $scope.markerIndex = (function() { @@ -57,7 +58,7 @@ })(); } }; - _withinLimits = function(day, month) { + _withinLimits = $scope.overloading.withinLimits || function(day, month) { var withinLimits; withinLimits = true; if ($scope.before) { @@ -68,7 +69,7 @@ } return withinLimits; }; - _getMarker = function(day) { + _getMarker = $scope.overloading.getMarker || function(day) { var ix; ix = _indexOfMoment($scope.markerIndex, day, 'day'); if (ix > -1) { @@ -77,7 +78,7 @@ return void 0; } }; - _isSelected = function(day) { + _isSelected = $scope.overloading.isSelected || function(day) { switch ($scope.options.mode) { case "multiple": return _indexOfMoment($scope.model, day, 'day') > -1; @@ -85,7 +86,7 @@ return $scope.model && day.isSame($scope.model, 'day'); } }; - _isInRange = function(day) { + _isInRange = $scope.overloading.isInRange || function(day) { if ($scope.options.rangeMode) { if ($scope.options.rangeMode === "from") { return moment.range($scope.model, $scope.before).contains(day) || day.isSame($scope.before, 'day'); @@ -96,7 +97,7 @@ return false; } }; - _buildWeek = function(time, month) { + _buildWeek = $scope.overloading.buildWeek || function(time, month) { var days, filter, start; days = []; filter = true; @@ -119,7 +120,7 @@ }); return days; }; - _buildMonth = function(time) { + _buildMonth = $scope.overloading.buildMonth || function(time) { var calendarEnd, calendarStart, start, w, weeks, weeksInMonth; weeks = []; calendarStart = moment(time).startOf('month'); @@ -139,7 +140,7 @@ name: time.format("MMMM YYYY") }; }; - _setup = function() { + _setup = $scope.overloading.setup || function() { var attr, dates, start, tempOptions, v, _ref; tempOptions = {}; for (attr in options) { @@ -181,7 +182,7 @@ _indexMarkers(); return $scope.options.template = $scope.options.template.replace('ng-bind-template=""', 'ng-bind-template="' + $scope.options.markerTemplate + '"'); }; - _prepare = function() { + _prepare = $scope.overloading.prepare || function() { var m; $scope.months = []; return $scope.months = (function() { diff --git a/package.json b/package.json index 0466eea..6f6b745 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-mighty-datepicker", - "version": "0.1.4", + "version": "0.1.5", "authors": [ "Krzysztof Jung ", "Patryk Peas ", From 67ac60fe0ba54857850c09ffbb4a872b71d2ed98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B5=D0=BD=D0=B8=D1=81?= Date: Sun, 27 Aug 2017 15:53:57 +0300 Subject: [PATCH 2/6] Added full time of month export --- build/angular-mighty-datepicker.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/angular-mighty-datepicker.js b/build/angular-mighty-datepicker.js index 388d97d..200d380 100644 --- a/build/angular-mighty-datepicker.js +++ b/build/angular-mighty-datepicker.js @@ -137,7 +137,8 @@ })(); return { weeks: weeks, - name: time.format("MMMM YYYY") + name: time.format("MMMM YYYY"), + time: time }; }; _setup = $scope.overloading.setup || function() { From 32c12448c50228d3e250c93957539016cf86068d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B5=D0=BD=D0=B8=D1=81?= Date: Sun, 27 Aug 2017 15:57:15 +0300 Subject: [PATCH 3/6] Fixed bug with not existed object --- build/angular-mighty-datepicker.js | 53 +++++++++++++++--------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/build/angular-mighty-datepicker.js b/build/angular-mighty-datepicker.js index 200d380..954727f 100644 --- a/build/angular-mighty-datepicker.js +++ b/build/angular-mighty-datepicker.js @@ -1,6 +1,6 @@ -(function() { +(function () { angular.module("mightyDatepicker", []).directive("mightyDatepicker", [ - "$compile", function($compile) { + "$compile", function ($compile) { var options, pickerTemplate; pickerTemplate = "
\n \n
\n
\n \n \n \n \n \n \n
\n {{:: day.date.date() }}\n
\n
\n
\n
\n
\n \n
\n
\n {{:: day.date.format('dd') }}\n
\n
\n \n
"; options = { @@ -26,14 +26,15 @@ overloading: '=', rangeTo: '=' }, - link: function($scope, $element, $attrs) { + link: function ($scope, $element, $attrs) { var _bake, _build, _buildMonth, _buildWeek, _getMarker, _indexMarkers, _indexOfMoment, _isInRange, _isSelected, _prepare, _setup, _withinLimits; - _bake = $scope.overloading.bake || function() { + var overloading = $scope.overloading || {}; + _bake = $scope.overloading.bake || function () { var domEl; domEl = $compile(angular.element($scope.options.template))($scope); return $element.append(domEl); }; - _indexOfMoment = function(array, element, match) { + _indexOfMoment = function (array, element, match) { var key, value; for (key in array) { value = array[key]; @@ -43,10 +44,10 @@ } return -1; }; - _indexMarkers = $scope.overloading.indexMarkers || function() { + _indexMarkers = $scope.overloading.indexMarkers || function () { var marker; if ($scope.markers) { - return $scope.markerIndex = (function() { + return $scope.markerIndex = (function () { var _i, _len, _ref, _results; _ref = $scope.markers; _results = []; @@ -58,7 +59,7 @@ })(); } }; - _withinLimits = $scope.overloading.withinLimits || function(day, month) { + _withinLimits = $scope.overloading.withinLimits || function (day, month) { var withinLimits; withinLimits = true; if ($scope.before) { @@ -69,7 +70,7 @@ } return withinLimits; }; - _getMarker = $scope.overloading.getMarker || function(day) { + _getMarker = $scope.overloading.getMarker || function (day) { var ix; ix = _indexOfMoment($scope.markerIndex, day, 'day'); if (ix > -1) { @@ -78,7 +79,7 @@ return void 0; } }; - _isSelected = $scope.overloading.isSelected || function(day) { + _isSelected = $scope.overloading.isSelected || function (day) { switch ($scope.options.mode) { case "multiple": return _indexOfMoment($scope.model, day, 'day') > -1; @@ -86,7 +87,7 @@ return $scope.model && day.isSame($scope.model, 'day'); } }; - _isInRange = $scope.overloading.isInRange || function(day) { + _isInRange = $scope.overloading.isInRange || function (day) { if ($scope.options.rangeMode) { if ($scope.options.rangeMode === "from") { return moment.range($scope.model, $scope.before).contains(day) || day.isSame($scope.before, 'day'); @@ -97,12 +98,12 @@ return false; } }; - _buildWeek = $scope.overloading.buildWeek || function(time, month) { + _buildWeek = $scope.overloading.buildWeek || function (time, month) { var days, filter, start; days = []; filter = true; start = time.startOf('week'); - days = [0, 1, 2, 3, 4, 5, 6].map(function(d) { + days = [0, 1, 2, 3, 4, 5, 6].map(function (d) { var day, withinLimits, withinMonth; day = moment(start).add(d, 'days'); withinMonth = day.month() === month; @@ -120,14 +121,14 @@ }); return days; }; - _buildMonth = $scope.overloading.buildMonth || function(time) { + _buildMonth = $scope.overloading.buildMonth || function (time) { var calendarEnd, calendarStart, start, w, weeks, weeksInMonth; weeks = []; calendarStart = moment(time).startOf('month'); calendarEnd = moment(time).endOf('month'); weeksInMonth = 5; start = time.startOf('month'); - weeks = (function() { + weeks = (function () { var _i, _results; _results = []; for (w = _i = 0; 0 <= weeksInMonth ? _i <= weeksInMonth : _i >= weeksInMonth; w = 0 <= weeksInMonth ? ++_i : --_i) { @@ -141,7 +142,7 @@ time: time }; }; - _setup = $scope.overloading.setup || function() { + _setup = $scope.overloading.setup || function () { var attr, dates, start, tempOptions, v, _ref; tempOptions = {}; for (attr in options) { @@ -183,10 +184,10 @@ _indexMarkers(); return $scope.options.template = $scope.options.template.replace('ng-bind-template=""', 'ng-bind-template="' + $scope.options.markerTemplate + '"'); }; - _prepare = $scope.overloading.prepare || function() { + _prepare = $scope.overloading.prepare || function () { var m; $scope.months = []; - return $scope.months = (function() { + return $scope.months = (function () { var _i, _ref, _results; _results = []; for (m = _i = 0, _ref = $scope.options.months; 0 <= _ref ? _i < _ref : _i > _ref; m = 0 <= _ref ? ++_i : --_i) { @@ -195,11 +196,11 @@ return _results; })(); }; - _build = function() { + _build = function () { _prepare(); return _bake(); }; - $scope.moveMonth = function(step, $event) { + $scope.moveMonth = function (step, $event) { if ($event != null) { if (typeof $event.stopPropagation === "function") { $event.stopPropagation(); @@ -208,7 +209,7 @@ $scope.options.start.add(step, 'month'); _prepare(); }; - $scope.select = function(day, $event) { + $scope.select = function (day, $event) { var ix; if ($event != null) { if (typeof $event.stopPropagation === "function") { @@ -235,7 +236,7 @@ } return _prepare(); }; - $scope.$watchCollection('markers', function(newMarkers, oldMarkers) { + $scope.$watchCollection('markers', function (newMarkers, oldMarkers) { _indexMarkers(); return _prepare(); }); @@ -243,12 +244,12 @@ _build(); switch ($scope.options.mode) { case "multiple": - $scope.$watchCollection('model', function(newVals, oldVals) { + $scope.$watchCollection('model', function (newVals, oldVals) { return _prepare(); }); break; case "simple": - $scope.$watch('model', function(newVal, oldVal) { + $scope.$watch('model', function (newVal, oldVal) { if (!moment.isMoment(newVal)) { newVal = moment(newVal); } @@ -261,7 +262,7 @@ } }); } - $scope.$watch('before', function(newVal, oldVal) { + $scope.$watch('before', function (newVal, oldVal) { if (newVal) { if (!moment.isMoment(newVal)) { newVal = moment(newVal); @@ -271,7 +272,7 @@ } } }); - return $scope.$watch('after', function(newVal, oldVal) { + return $scope.$watch('after', function (newVal, oldVal) { if (newVal) { if (!moment.isMoment(newVal)) { newVal = moment(newVal); From 9f4cb72a8c3bf575a3b77e89ff16bffb7988bcbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B5=D0=BD=D0=B8=D1=81?= Date: Sun, 27 Aug 2017 16:01:45 +0300 Subject: [PATCH 4/6] Removed comments from gulpfile --- build/angular-mighty-datepicker.js | 22 +++++++++++----------- gulpfile.js | 10 ---------- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/build/angular-mighty-datepicker.js b/build/angular-mighty-datepicker.js index 954727f..bc2370c 100644 --- a/build/angular-mighty-datepicker.js +++ b/build/angular-mighty-datepicker.js @@ -28,8 +28,8 @@ }, link: function ($scope, $element, $attrs) { var _bake, _build, _buildMonth, _buildWeek, _getMarker, _indexMarkers, _indexOfMoment, _isInRange, _isSelected, _prepare, _setup, _withinLimits; - var overloading = $scope.overloading || {}; - _bake = $scope.overloading.bake || function () { + var overloading = overloading || {}; + _bake = overloading.bake || function () { var domEl; domEl = $compile(angular.element($scope.options.template))($scope); return $element.append(domEl); @@ -44,7 +44,7 @@ } return -1; }; - _indexMarkers = $scope.overloading.indexMarkers || function () { + _indexMarkers = overloading.indexMarkers || function () { var marker; if ($scope.markers) { return $scope.markerIndex = (function () { @@ -59,7 +59,7 @@ })(); } }; - _withinLimits = $scope.overloading.withinLimits || function (day, month) { + _withinLimits = overloading.withinLimits || function (day, month) { var withinLimits; withinLimits = true; if ($scope.before) { @@ -70,7 +70,7 @@ } return withinLimits; }; - _getMarker = $scope.overloading.getMarker || function (day) { + _getMarker = overloading.getMarker || function (day) { var ix; ix = _indexOfMoment($scope.markerIndex, day, 'day'); if (ix > -1) { @@ -79,7 +79,7 @@ return void 0; } }; - _isSelected = $scope.overloading.isSelected || function (day) { + _isSelected = overloading.isSelected || function (day) { switch ($scope.options.mode) { case "multiple": return _indexOfMoment($scope.model, day, 'day') > -1; @@ -87,7 +87,7 @@ return $scope.model && day.isSame($scope.model, 'day'); } }; - _isInRange = $scope.overloading.isInRange || function (day) { + _isInRange = overloading.isInRange || function (day) { if ($scope.options.rangeMode) { if ($scope.options.rangeMode === "from") { return moment.range($scope.model, $scope.before).contains(day) || day.isSame($scope.before, 'day'); @@ -98,7 +98,7 @@ return false; } }; - _buildWeek = $scope.overloading.buildWeek || function (time, month) { + _buildWeek = overloading.buildWeek || function (time, month) { var days, filter, start; days = []; filter = true; @@ -121,7 +121,7 @@ }); return days; }; - _buildMonth = $scope.overloading.buildMonth || function (time) { + _buildMonth = overloading.buildMonth || function (time) { var calendarEnd, calendarStart, start, w, weeks, weeksInMonth; weeks = []; calendarStart = moment(time).startOf('month'); @@ -142,7 +142,7 @@ time: time }; }; - _setup = $scope.overloading.setup || function () { + _setup = overloading.setup || function () { var attr, dates, start, tempOptions, v, _ref; tempOptions = {}; for (attr in options) { @@ -184,7 +184,7 @@ _indexMarkers(); return $scope.options.template = $scope.options.template.replace('ng-bind-template=""', 'ng-bind-template="' + $scope.options.markerTemplate + '"'); }; - _prepare = $scope.overloading.prepare || function () { + _prepare = overloading.prepare || function () { var m; $scope.months = []; return $scope.months = (function () { diff --git a/gulpfile.js b/gulpfile.js index f3cfbd9..3aecafa 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -47,15 +47,6 @@ gulp.task("bower", function() { .pipe(gulp.dest("bower_components")) }); -// compilers - -// gulp.task("copy", function(){ -// return gulp.src(paths.src + "**/*.{json,png,jpg,gif,eot,svg,ttf,woff}") -// .pipe(changed(paths.dst)) -// .pipe(gulp.dest(paths.dst)) -// .pipe(connect.reload()); -// }); - gulp.task("less", function(){ return gulp.src(paths.src + "**/*.less") .pipe(changed(paths.dst, { extension: '.css' })) @@ -79,4 +70,3 @@ gulp.task("coffee", function(){ .pipe(gulp.dest(paths.dst)) .pipe(connect.reload()); }); -// From f979ead43f4e4435a01effd8950195dca1e20f63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B5=D0=BD=D0=B8=D1=81?= Date: Sun, 27 Aug 2017 16:04:51 +0300 Subject: [PATCH 5/6] Fixes with overloading --- build/angular-mighty-datepicker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/angular-mighty-datepicker.js b/build/angular-mighty-datepicker.js index bc2370c..583dd15 100644 --- a/build/angular-mighty-datepicker.js +++ b/build/angular-mighty-datepicker.js @@ -28,7 +28,7 @@ }, link: function ($scope, $element, $attrs) { var _bake, _build, _buildMonth, _buildWeek, _getMarker, _indexMarkers, _indexOfMoment, _isInRange, _isSelected, _prepare, _setup, _withinLimits; - var overloading = overloading || {}; + var overloading = $scope.overloading || {}; _bake = overloading.bake || function () { var domEl; domEl = $compile(angular.element($scope.options.template))($scope); From e58def67fb10104b8c4803727247858c31789b70 Mon Sep 17 00:00:00 2001 From: Denis Date: Fri, 15 Dec 2017 16:37:17 +0200 Subject: [PATCH 6/6] Added month number to month object --- build/angular-mighty-datepicker.js | 56 ++++++++++++++-------------- src/angular-mighty-datepicker.coffee | 3 +- 2 files changed, 29 insertions(+), 30 deletions(-) diff --git a/build/angular-mighty-datepicker.js b/build/angular-mighty-datepicker.js index 583dd15..34893c6 100644 --- a/build/angular-mighty-datepicker.js +++ b/build/angular-mighty-datepicker.js @@ -1,6 +1,6 @@ -(function () { +(function() { angular.module("mightyDatepicker", []).directive("mightyDatepicker", [ - "$compile", function ($compile) { + "$compile", function($compile) { var options, pickerTemplate; pickerTemplate = "
\n \n
\n
\n \n \n \n \n \n \n
\n {{:: day.date.date() }}\n
\n
\n
\n
\n
\n \n
\n
\n {{:: day.date.format('dd') }}\n
\n
\n \n
"; options = { @@ -23,18 +23,16 @@ after: '=', before: '=', rangeFrom: '=', - overloading: '=', rangeTo: '=' }, - link: function ($scope, $element, $attrs) { + link: function($scope, $element, $attrs) { var _bake, _build, _buildMonth, _buildWeek, _getMarker, _indexMarkers, _indexOfMoment, _isInRange, _isSelected, _prepare, _setup, _withinLimits; - var overloading = $scope.overloading || {}; - _bake = overloading.bake || function () { + _bake = function() { var domEl; domEl = $compile(angular.element($scope.options.template))($scope); return $element.append(domEl); }; - _indexOfMoment = function (array, element, match) { + _indexOfMoment = function(array, element, match) { var key, value; for (key in array) { value = array[key]; @@ -44,10 +42,10 @@ } return -1; }; - _indexMarkers = overloading.indexMarkers || function () { + _indexMarkers = function() { var marker; if ($scope.markers) { - return $scope.markerIndex = (function () { + return $scope.markerIndex = (function() { var _i, _len, _ref, _results; _ref = $scope.markers; _results = []; @@ -59,7 +57,7 @@ })(); } }; - _withinLimits = overloading.withinLimits || function (day, month) { + _withinLimits = function(day, month) { var withinLimits; withinLimits = true; if ($scope.before) { @@ -70,7 +68,7 @@ } return withinLimits; }; - _getMarker = overloading.getMarker || function (day) { + _getMarker = function(day) { var ix; ix = _indexOfMoment($scope.markerIndex, day, 'day'); if (ix > -1) { @@ -79,7 +77,7 @@ return void 0; } }; - _isSelected = overloading.isSelected || function (day) { + _isSelected = function(day) { switch ($scope.options.mode) { case "multiple": return _indexOfMoment($scope.model, day, 'day') > -1; @@ -87,7 +85,7 @@ return $scope.model && day.isSame($scope.model, 'day'); } }; - _isInRange = overloading.isInRange || function (day) { + _isInRange = function(day) { if ($scope.options.rangeMode) { if ($scope.options.rangeMode === "from") { return moment.range($scope.model, $scope.before).contains(day) || day.isSame($scope.before, 'day'); @@ -98,12 +96,12 @@ return false; } }; - _buildWeek = overloading.buildWeek || function (time, month) { + _buildWeek = function(time, month) { var days, filter, start; days = []; filter = true; start = time.startOf('week'); - days = [0, 1, 2, 3, 4, 5, 6].map(function (d) { + days = [0, 1, 2, 3, 4, 5, 6].map(function(d) { var day, withinLimits, withinMonth; day = moment(start).add(d, 'days'); withinMonth = day.month() === month; @@ -121,14 +119,14 @@ }); return days; }; - _buildMonth = overloading.buildMonth || function (time) { + _buildMonth = function(time) { var calendarEnd, calendarStart, start, w, weeks, weeksInMonth; weeks = []; calendarStart = moment(time).startOf('month'); calendarEnd = moment(time).endOf('month'); weeksInMonth = 5; start = time.startOf('month'); - weeks = (function () { + weeks = (function() { var _i, _results; _results = []; for (w = _i = 0; 0 <= weeksInMonth ? _i <= weeksInMonth : _i >= weeksInMonth; w = 0 <= weeksInMonth ? ++_i : --_i) { @@ -139,10 +137,10 @@ return { weeks: weeks, name: time.format("MMMM YYYY"), - time: time + number: time.format("MM") }; }; - _setup = overloading.setup || function () { + _setup = function() { var attr, dates, start, tempOptions, v, _ref; tempOptions = {}; for (attr in options) { @@ -184,10 +182,10 @@ _indexMarkers(); return $scope.options.template = $scope.options.template.replace('ng-bind-template=""', 'ng-bind-template="' + $scope.options.markerTemplate + '"'); }; - _prepare = overloading.prepare || function () { + _prepare = function() { var m; $scope.months = []; - return $scope.months = (function () { + return $scope.months = (function() { var _i, _ref, _results; _results = []; for (m = _i = 0, _ref = $scope.options.months; 0 <= _ref ? _i < _ref : _i > _ref; m = 0 <= _ref ? ++_i : --_i) { @@ -196,11 +194,11 @@ return _results; })(); }; - _build = function () { + _build = function() { _prepare(); return _bake(); }; - $scope.moveMonth = function (step, $event) { + $scope.moveMonth = function(step, $event) { if ($event != null) { if (typeof $event.stopPropagation === "function") { $event.stopPropagation(); @@ -209,7 +207,7 @@ $scope.options.start.add(step, 'month'); _prepare(); }; - $scope.select = function (day, $event) { + $scope.select = function(day, $event) { var ix; if ($event != null) { if (typeof $event.stopPropagation === "function") { @@ -236,7 +234,7 @@ } return _prepare(); }; - $scope.$watchCollection('markers', function (newMarkers, oldMarkers) { + $scope.$watchCollection('markers', function(newMarkers, oldMarkers) { _indexMarkers(); return _prepare(); }); @@ -244,12 +242,12 @@ _build(); switch ($scope.options.mode) { case "multiple": - $scope.$watchCollection('model', function (newVals, oldVals) { + $scope.$watchCollection('model', function(newVals, oldVals) { return _prepare(); }); break; case "simple": - $scope.$watch('model', function (newVal, oldVal) { + $scope.$watch('model', function(newVal, oldVal) { if (!moment.isMoment(newVal)) { newVal = moment(newVal); } @@ -262,7 +260,7 @@ } }); } - $scope.$watch('before', function (newVal, oldVal) { + $scope.$watch('before', function(newVal, oldVal) { if (newVal) { if (!moment.isMoment(newVal)) { newVal = moment(newVal); @@ -272,7 +270,7 @@ } } }); - return $scope.$watch('after', function (newVal, oldVal) { + return $scope.$watch('after', function(newVal, oldVal) { if (newVal) { if (!moment.isMoment(newVal)) { newVal = moment(newVal); diff --git a/src/angular-mighty-datepicker.coffee b/src/angular-mighty-datepicker.coffee index 624824b..0290fea 100644 --- a/src/angular-mighty-datepicker.coffee +++ b/src/angular-mighty-datepicker.coffee @@ -132,7 +132,8 @@ angular.module("mightyDatepicker", [ ]).directive "mightyDatepicker", ["$compile _buildWeek(moment(start).add(w, 'weeks'), moment(start).month() ) for w in [0 .. weeksInMonth]) weeks: weeks - name: time.format("MMMM YYYY") + name: time.format("MMMM YYYY"), + number: time.format("MM") _setup = -> tempOptions = {}