fixing the build

This commit is contained in:
Costica Puntaru
2014-06-16 11:02:46 +03:00
parent 832bf1feab
commit c615a28e2f
4 changed files with 14 additions and 8 deletions

View File

@@ -186,7 +186,7 @@ Module.directive('datePicker', ['datePickerConfig', function datePickerDirective
scope.setDate = function (date) {
if(attrs.disabled) {
return
return;
}
scope.date = date;
// change next view

View File

@@ -9,10 +9,10 @@ Module.directive('dateRange', function () {
start: '=',
end: '='
},
link: function (scope) {
link: function (scope, element, attrs) {
attrs.$observe('disabled', function(isDisabled){
scope.disableDatePickers = isDisabled
});
scope.disableDatePickers = !!isDisabled;
});
scope.$watch('start.getTime()', function (value) {
if (value && scope.end && value > scope.end.getTime()) {
scope.end = new Date(value);

12
dist/index.js vendored
View File

@@ -187,6 +187,9 @@ Module.directive('datePicker', ['datePickerConfig', function datePickerDirective
};
scope.setDate = function (date) {
if(attrs.disabled) {
return;
}
scope.date = date;
// change next view
var nextView = scope.views[scope.views.indexOf(scope.view) + 1];
@@ -342,7 +345,10 @@ Module.directive('dateRange', function () {
start: '=',
end: '='
},
link: function (scope) {
link: function (scope, element, attrs) {
attrs.$observe('disabled', function(isDisabled){
scope.disableDatePickers = !!isDisabled;
});
scope.$watch('start.getTime()', function (value) {
if (value && scope.end && value > scope.end.getTime()) {
scope.end = new Date(value);
@@ -729,13 +735,13 @@ angular.module("datePicker").run(["$templateCache", function($templateCache) {
"\n" +
" <td valign=\"top\">\r" +
"\n" +
" <div date-picker=\"start\" class=\"date-picker\" date after=\"start\" before=\"end\" min-view=\"date\" max-view=\"date\"></div>\r" +
" <div date-picker=\"start\" ng-disabled=\"disableDatePickers\" class=\"date-picker\" date after=\"start\" before=\"end\" min-view=\"date\" max-view=\"date\"></div>\r" +
"\n" +
" </td>\r" +
"\n" +
" <td valign=\"top\">\r" +
"\n" +
" <div date-picker=\"end\" class=\"date-picker\" date after=\"start\" before=\"end\" min-view=\"date\" max-view=\"date\"></div>\r" +
" <div date-picker=\"end\" ng-disabled=\"disableDatePickers\" class=\"date-picker\" date after=\"start\" before=\"end\" min-view=\"date\" max-view=\"date\"></div>\r" +
"\n" +
" </td>\r" +
"\n" +

2
dist/index.min.js vendored

File diff suppressed because one or more lines are too long