angular-datepicker-custom
Advanced tools
Comparing version 2.1.13 to 2.1.14
@@ -122,6 +122,9 @@ (function (global, factory) { | ||
scope.$on('selectDate', (e, d, fromOther) => { | ||
scope.selectDate(d, fromOther); | ||
scope.selectDate(e, d, fromOther); | ||
}) | ||
scope.selectDate = function (date, fromOther) { | ||
scope.selectDate = function (e, date, fromOther) { | ||
if (angular.element(e.target).hasClass('disabled')) { | ||
return false; | ||
} | ||
if (attrs.disabled) { | ||
@@ -1061,3 +1064,3 @@ return false; | ||
"\n" + | ||
" ng-click=\"selectDate(day)\" ng-bind=\"day|mFormat:'DD':tz\"></span>\r" + | ||
" ng-click=\"selectDate($event, day)\" ng-bind=\"day|mFormat:'DD':tz\"></span>\r" + | ||
"\n" + | ||
@@ -1102,3 +1105,3 @@ " </td>\r" + | ||
"\n" + | ||
" ng-click=\"selectDate(year)\" ng-bind=\"year.year()\"></span>\r" + | ||
" ng-click=\"selectDate($event, year)\" ng-bind=\"year.year()\"></span>\r" + | ||
"\n" + | ||
@@ -1143,3 +1146,3 @@ " </td>\r" + | ||
"\n" + | ||
" ng-click=\"selectDate(month)\"\r" + | ||
" ng-click=\"selectDate($event, month)\"\r" + | ||
"\n" + | ||
@@ -1186,3 +1189,3 @@ " ng-bind=\"month|mFormat:'MMM':tz\"></span>\r" + | ||
"\n" + | ||
" ng-click=\"selectDate(hour)\" ng-bind=\"hour|mFormat:'HH:mm':tz\"></span>\r" + | ||
" ng-click=\"selectDate($event, hour)\" ng-bind=\"hour|mFormat:'HH:mm':tz\"></span>\r" + | ||
"\n" + | ||
@@ -1227,3 +1230,3 @@ " </td>\r" + | ||
"\n" + | ||
" ng-click=\"selectDate(minute)\"\r" + | ||
" ng-click=\"selectDate($event, minute)\"\r" + | ||
"\n" + | ||
@@ -1230,0 +1233,0 @@ " ng-bind=\"minute|mFormat:'HH:mm':tz\"></span>\r" + |
@@ -120,6 +120,9 @@ 'use strict'; | ||
scope.$on('selectDate', function (e, d, fromOther) { | ||
scope.selectDate(d, fromOther); | ||
scope.selectDate(e, d, fromOther); | ||
}); | ||
scope.selectDate = function (date, fromOther) { | ||
scope.selectDate = function (e, date, fromOther) { | ||
if (angular.element(e.target).hasClass('disabled')) { | ||
return false; | ||
} | ||
if (attrs.disabled) { | ||
@@ -995,4 +998,4 @@ return false; | ||
angular.module('datePicker').run(['$templateCache', function ($templateCache) { | ||
$templateCache.put('templates/datepicker.html', "<div ng-switch=\"view\">\r" + "\n" + " <div ng-switch-when=\"date\">\r" + "\n" + " <table>\r" + "\n" + " <thead>\r" + "\n" + " <tr>\r" + "\n" + " <th ng-click=\"prev()\">‹</th>\r" + "\n" + " <th colspan=\"5\" class=\"switch\" ng-click=\"setView('month')\" ng-bind=\"date|mFormat:'YYYY MMMM':tz\"></th>\r" + "\n" + " <th ng-click=\"next()\">›</i></th>\r" + "\n" + " </tr>\r" + "\n" + " <tr>\r" + "\n" + " <th ng-repeat=\"day in weekdays\" style=\"overflow: hidden\" ng-bind=\"day|mFormat:'ddd':tz\"></th>\r" + "\n" + " </tr>\r" + "\n" + " </thead>\r" + "\n" + " <tbody>\r" + "\n" + " <tr ng-repeat=\"week in weeks\" ng-init=\"$index2 = $index\">\r" + "\n" + " <td ng-repeat=\"day in week\">\r" + "\n" + " <span\r" + "\n" + " ng-class=\"classes[$index2][$index]\"\r" + "\n" + " ng-click=\"selectDate(day)\" ng-bind=\"day|mFormat:'DD':tz\"></span>\r" + "\n" + " </td>\r" + "\n" + " </tr>\r" + "\n" + " </tbody>\r" + "\n" + " </table>\r" + "\n" + " </div>\r" + "\n" + " <div ng-switch-when=\"year\">\r" + "\n" + " <table>\r" + "\n" + " <thead>\r" + "\n" + " <tr>\r" + "\n" + " <th ng-click=\"prev(10)\">‹</th>\r" + "\n" + " <th colspan=\"5\" class=\"switch\"ng-bind=\"years[0].year()+' - '+years[years.length-1].year()\"></th>\r" + "\n" + " <th ng-click=\"next(10)\">›</i></th>\r" + "\n" + " </tr>\r" + "\n" + " </thead>\r" + "\n" + " <tbody>\r" + "\n" + " <tr>\r" + "\n" + " <td colspan=\"7\">\r" + "\n" + " <span ng-class=\"classes[$index]\"\r" + "\n" + " ng-repeat=\"year in years\"\r" + "\n" + " ng-click=\"selectDate(year)\" ng-bind=\"year.year()\"></span>\r" + "\n" + " </td>\r" + "\n" + " </tr>\r" + "\n" + " </tbody>\r" + "\n" + " </table>\r" + "\n" + " </div>\r" + "\n" + " <div ng-switch-when=\"month\">\r" + "\n" + " <table>\r" + "\n" + " <thead>\r" + "\n" + " <tr>\r" + "\n" + " <th ng-click=\"prev()\">‹</th>\r" + "\n" + " <th colspan=\"5\" class=\"switch\" ng-click=\"setView('year')\" ng-bind=\"date|mFormat:'YYYY':tz\"></th>\r" + "\n" + " <th ng-click=\"next()\">›</i></th>\r" + "\n" + " </tr>\r" + "\n" + " </thead>\r" + "\n" + " <tbody>\r" + "\n" + " <tr>\r" + "\n" + " <td colspan=\"7\">\r" + "\n" + " <span ng-repeat=\"month in months\"\r" + "\n" + " ng-class=\"classes[$index]\"\r" + "\n" + " ng-click=\"selectDate(month)\"\r" + "\n" + " ng-bind=\"month|mFormat:'MMM':tz\"></span>\r" + "\n" + " </td>\r" + "\n" + " </tr>\r" + "\n" + " </tbody>\r" + "\n" + " </table>\r" + "\n" + " </div>\r" + "\n" + " <div ng-switch-when=\"hours\">\r" + "\n" + " <table>\r" + "\n" + " <thead>\r" + "\n" + " <tr>\r" + "\n" + " <th ng-click=\"prev(24)\">‹</th>\r" + "\n" + " <th colspan=\"5\" class=\"switch\" ng-click=\"setView('date')\" ng-bind=\"date|mFormat:'DD MMMM YYYY':tz\"></th>\r" + "\n" + " <th ng-click=\"next(24)\">›</i></th>\r" + "\n" + " </tr>\r" + "\n" + " </thead>\r" + "\n" + " <tbody>\r" + "\n" + " <tr>\r" + "\n" + " <td colspan=\"7\">\r" + "\n" + " <span ng-repeat=\"hour in hours\"\r" + "\n" + " ng-class=\"classes[$index]\"\r" + "\n" + " ng-click=\"selectDate(hour)\" ng-bind=\"hour|mFormat:'HH:mm':tz\"></span>\r" + "\n" + " </td>\r" + "\n" + " </tr>\r" + "\n" + " </tbody>\r" + "\n" + " </table>\r" + "\n" + " </div>\r" + "\n" + " <div ng-switch-when=\"minutes\">\r" + "\n" + " <table>\r" + "\n" + " <thead>\r" + "\n" + " <tr>\r" + "\n" + " <th ng-click=\"prev()\">‹</th>\r" + "\n" + " <th colspan=\"5\" class=\"switch\" ng-click=\"setView('hours')\" ng-bind=\"date|mFormat:'DD MMMM YYYY':tz\"></th>\r" + "\n" + " <th ng-click=\"next()\">›</i></th>\r" + "\n" + " </tr>\r" + "\n" + " </thead>\r" + "\n" + " <tbody>\r" + "\n" + " <tr>\r" + "\n" + " <td colspan=\"7\">\r" + "\n" + " <span ng-repeat=\"minute in minutes\"\r" + "\n" + " ng-class=\"classes[$index]\"\r" + "\n" + " ng-click=\"selectDate(minute)\"\r" + "\n" + " ng-bind=\"minute|mFormat:'HH:mm':tz\"></span>\r" + "\n" + " </td>\r" + "\n" + " </tr>\r" + "\n" + " </tbody>\r" + "\n" + " </table>\r" + "\n" + " </div>\r" + "\n" + "</div>"); | ||
$templateCache.put('templates/datepicker.html', "<div ng-switch=\"view\">\r" + "\n" + " <div ng-switch-when=\"date\">\r" + "\n" + " <table>\r" + "\n" + " <thead>\r" + "\n" + " <tr>\r" + "\n" + " <th ng-click=\"prev()\">‹</th>\r" + "\n" + " <th colspan=\"5\" class=\"switch\" ng-click=\"setView('month')\" ng-bind=\"date|mFormat:'YYYY MMMM':tz\"></th>\r" + "\n" + " <th ng-click=\"next()\">›</i></th>\r" + "\n" + " </tr>\r" + "\n" + " <tr>\r" + "\n" + " <th ng-repeat=\"day in weekdays\" style=\"overflow: hidden\" ng-bind=\"day|mFormat:'ddd':tz\"></th>\r" + "\n" + " </tr>\r" + "\n" + " </thead>\r" + "\n" + " <tbody>\r" + "\n" + " <tr ng-repeat=\"week in weeks\" ng-init=\"$index2 = $index\">\r" + "\n" + " <td ng-repeat=\"day in week\">\r" + "\n" + " <span\r" + "\n" + " ng-class=\"classes[$index2][$index]\"\r" + "\n" + " ng-click=\"selectDate($event, day)\" ng-bind=\"day|mFormat:'DD':tz\"></span>\r" + "\n" + " </td>\r" + "\n" + " </tr>\r" + "\n" + " </tbody>\r" + "\n" + " </table>\r" + "\n" + " </div>\r" + "\n" + " <div ng-switch-when=\"year\">\r" + "\n" + " <table>\r" + "\n" + " <thead>\r" + "\n" + " <tr>\r" + "\n" + " <th ng-click=\"prev(10)\">‹</th>\r" + "\n" + " <th colspan=\"5\" class=\"switch\"ng-bind=\"years[0].year()+' - '+years[years.length-1].year()\"></th>\r" + "\n" + " <th ng-click=\"next(10)\">›</i></th>\r" + "\n" + " </tr>\r" + "\n" + " </thead>\r" + "\n" + " <tbody>\r" + "\n" + " <tr>\r" + "\n" + " <td colspan=\"7\">\r" + "\n" + " <span ng-class=\"classes[$index]\"\r" + "\n" + " ng-repeat=\"year in years\"\r" + "\n" + " ng-click=\"selectDate($event, year)\" ng-bind=\"year.year()\"></span>\r" + "\n" + " </td>\r" + "\n" + " </tr>\r" + "\n" + " </tbody>\r" + "\n" + " </table>\r" + "\n" + " </div>\r" + "\n" + " <div ng-switch-when=\"month\">\r" + "\n" + " <table>\r" + "\n" + " <thead>\r" + "\n" + " <tr>\r" + "\n" + " <th ng-click=\"prev()\">‹</th>\r" + "\n" + " <th colspan=\"5\" class=\"switch\" ng-click=\"setView('year')\" ng-bind=\"date|mFormat:'YYYY':tz\"></th>\r" + "\n" + " <th ng-click=\"next()\">›</i></th>\r" + "\n" + " </tr>\r" + "\n" + " </thead>\r" + "\n" + " <tbody>\r" + "\n" + " <tr>\r" + "\n" + " <td colspan=\"7\">\r" + "\n" + " <span ng-repeat=\"month in months\"\r" + "\n" + " ng-class=\"classes[$index]\"\r" + "\n" + " ng-click=\"selectDate($event, month)\"\r" + "\n" + " ng-bind=\"month|mFormat:'MMM':tz\"></span>\r" + "\n" + " </td>\r" + "\n" + " </tr>\r" + "\n" + " </tbody>\r" + "\n" + " </table>\r" + "\n" + " </div>\r" + "\n" + " <div ng-switch-when=\"hours\">\r" + "\n" + " <table>\r" + "\n" + " <thead>\r" + "\n" + " <tr>\r" + "\n" + " <th ng-click=\"prev(24)\">‹</th>\r" + "\n" + " <th colspan=\"5\" class=\"switch\" ng-click=\"setView('date')\" ng-bind=\"date|mFormat:'DD MMMM YYYY':tz\"></th>\r" + "\n" + " <th ng-click=\"next(24)\">›</i></th>\r" + "\n" + " </tr>\r" + "\n" + " </thead>\r" + "\n" + " <tbody>\r" + "\n" + " <tr>\r" + "\n" + " <td colspan=\"7\">\r" + "\n" + " <span ng-repeat=\"hour in hours\"\r" + "\n" + " ng-class=\"classes[$index]\"\r" + "\n" + " ng-click=\"selectDate($event, hour)\" ng-bind=\"hour|mFormat:'HH:mm':tz\"></span>\r" + "\n" + " </td>\r" + "\n" + " </tr>\r" + "\n" + " </tbody>\r" + "\n" + " </table>\r" + "\n" + " </div>\r" + "\n" + " <div ng-switch-when=\"minutes\">\r" + "\n" + " <table>\r" + "\n" + " <thead>\r" + "\n" + " <tr>\r" + "\n" + " <th ng-click=\"prev()\">‹</th>\r" + "\n" + " <th colspan=\"5\" class=\"switch\" ng-click=\"setView('hours')\" ng-bind=\"date|mFormat:'DD MMMM YYYY':tz\"></th>\r" + "\n" + " <th ng-click=\"next()\">›</i></th>\r" + "\n" + " </tr>\r" + "\n" + " </thead>\r" + "\n" + " <tbody>\r" + "\n" + " <tr>\r" + "\n" + " <td colspan=\"7\">\r" + "\n" + " <span ng-repeat=\"minute in minutes\"\r" + "\n" + " ng-class=\"classes[$index]\"\r" + "\n" + " ng-click=\"selectDate($event, minute)\"\r" + "\n" + " ng-bind=\"minute|mFormat:'HH:mm':tz\"></span>\r" + "\n" + " </td>\r" + "\n" + " </tr>\r" + "\n" + " </tbody>\r" + "\n" + " </table>\r" + "\n" + " </div>\r" + "\n" + "</div>"); | ||
}]); | ||
}); |
{ | ||
"name": "angular-datepicker-custom", | ||
"version": "2.1.13", | ||
"version": "2.1.14", | ||
"main": "dist/angular-datepicker.min.js", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
325976
9039