angular-datepicker-custom
Advanced tools
Comparing version 2.1.9 to 2.1.10
@@ -121,7 +121,7 @@ (function(global, factory) { | ||
scope.$on('selectDate', (e, d) => { | ||
scope.selectDate(d); | ||
scope.$on('selectDate', (e, d, fromOther) => { | ||
scope.selectDate(d, fromOther); | ||
}) | ||
scope.selectDate = function(date) { | ||
scope.selectDate = function(date, fromOther) { | ||
if (attrs.disabled) { | ||
@@ -141,3 +141,3 @@ return false; | ||
if ((!nextView || partial) || scope.model) { | ||
setDate(date); | ||
setDate(date, fromOther); | ||
} | ||
@@ -155,10 +155,10 @@ | ||
setDate = function(date) { | ||
setDate = function(date, fromOther) { | ||
// if (date) { | ||
scope.model = date; | ||
if (ngModel) { | ||
ngModel.$setViewValue(date); | ||
} | ||
scope.model = date; | ||
if (ngModel) { | ||
ngModel.$setViewValue(date); | ||
} | ||
// } | ||
scope.$emit('setDate', scope.model, scope.view); | ||
scope.$emit('setDate', scope.model, scope.view, fromOther); | ||
@@ -959,5 +959,5 @@ //This is duplicated in the new functionality. | ||
if (!shownOnce) { | ||
scope.$on('setDate', function(event, date, view) { | ||
scope.$on('setDate', function(event, date, view, fromOther) { | ||
updateInput(event); | ||
if (dateChange) { | ||
if (dateChange && fromOther !== true) { | ||
dateChange(attrs.ngModel, date); | ||
@@ -964,0 +964,0 @@ } |
@@ -121,7 +121,7 @@ (function(global, factory) { | ||
scope.$on('selectDate', (e, d) => { | ||
scope.selectDate(d); | ||
scope.$on('selectDate', (e, d, fromOther) => { | ||
scope.selectDate(d, fromOther); | ||
}) | ||
scope.selectDate = function(date) { | ||
scope.selectDate = function(date, fromOther) { | ||
if (attrs.disabled) { | ||
@@ -141,3 +141,3 @@ return false; | ||
if ((!nextView || partial) || scope.model) { | ||
setDate(date); | ||
setDate(date, fromOther); | ||
} | ||
@@ -155,10 +155,10 @@ | ||
setDate = function(date) { | ||
setDate = function(date, fromOther) { | ||
// if (date) { | ||
scope.model = date; | ||
if (ngModel) { | ||
ngModel.$setViewValue(date); | ||
} | ||
scope.model = date; | ||
if (ngModel) { | ||
ngModel.$setViewValue(date); | ||
} | ||
// } | ||
scope.$emit('setDate', scope.model, scope.view); | ||
scope.$emit('setDate', scope.model, scope.view, fromOther); | ||
@@ -959,5 +959,5 @@ //This is duplicated in the new functionality. | ||
if (!shownOnce) { | ||
scope.$on('setDate', function(event, date, view) { | ||
scope.$on('setDate', function(event, date, view, fromOther) { | ||
updateInput(event); | ||
if (dateChange) { | ||
if (dateChange && fromOther !== true) { | ||
dateChange(attrs.ngModel, date); | ||
@@ -964,0 +964,0 @@ } |
{ | ||
"name": "angular-datepicker-custom", | ||
"version": "2.1.9", | ||
"version": "2.1.10", | ||
"main": "dist/angular-datepicker.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
327167