fng-bootstrap-date 0.12.0-beta.217 → 0.12.0-beta.219
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fng-bootstrap-date.js +8 -8
- package/package.json +1 -1
package/fng-bootstrap-date.js
CHANGED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
$scope.popup.opened = true;
|
|
13
13
|
}
|
|
14
14
|
}])
|
|
15
|
-
.directive('fngUiBootstrapDatePicker', ['$compile', '$timeout', '
|
|
16
|
-
function ($compile, $timeout,
|
|
15
|
+
.directive('fngUiBootstrapDatePicker', ['$compile', '$timeout', 'PluginHelperService', 'FormMarkupHelperService', 'RecordHandlerService',
|
|
16
|
+
function ($compile, $timeout, PluginHelperService, FormMarkupHelperService, RecordHandlerService) {
|
|
17
17
|
return {
|
|
18
18
|
restrict: 'E',
|
|
19
19
|
replace: true,
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
var template;
|
|
35
|
-
var processedAttrs =
|
|
35
|
+
var processedAttrs = PluginHelperService.extractFromAttr(attrs, 'fngUiBootstrapDatePicker');
|
|
36
36
|
var overriddenDefaults = {
|
|
37
37
|
'show-button-bar': false,
|
|
38
38
|
'show-meridian': false,
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
// one possible use case would be to use the value of a hidden "when created" field as a minimum
|
|
58
58
|
// or maximum value for another (not hidden) date field
|
|
59
59
|
if (scope.dateOptions[v].startsWith("record.") || scope.dateOptions[v].startsWith("subDoc.")) {
|
|
60
|
-
scope.dateOptions[v] =
|
|
60
|
+
scope.dateOptions[v] = RecordHandlerService.getData(scope, scope.dateOptions[v]);
|
|
61
61
|
} else {
|
|
62
62
|
scope.dateOptions[v] = new Date(scope.dateOptions[v]);
|
|
63
63
|
}
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
})
|
|
66
66
|
|
|
67
67
|
const isArray = processedAttrs.info.array;
|
|
68
|
-
template =
|
|
68
|
+
template = PluginHelperService.buildInputMarkup(
|
|
69
69
|
scope,
|
|
70
70
|
attrs,
|
|
71
71
|
{
|
|
@@ -89,8 +89,8 @@
|
|
|
89
89
|
if (processedAttrs.info.required) {
|
|
90
90
|
str += " required";
|
|
91
91
|
}
|
|
92
|
-
const markup =
|
|
93
|
-
const disabled =
|
|
92
|
+
const markup = FormMarkupHelperService.addTextInputMarkup(buildingBlocks, processedAttrs.info, '');
|
|
93
|
+
const disabled = PluginHelperService.genDisabledStr(scope, processedAttrs, "");
|
|
94
94
|
const dateFormat = processedAttrs.directiveOptions.format || processedAttrs.directiveOptions['date-format'] || 'dd/MM/yy';
|
|
95
95
|
str += ` ${markup}${disabled}datepicker-options="dateOptions" uib-datepicker-popup="${dateFormat}"`;
|
|
96
96
|
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
}
|
|
102
102
|
str += ' is-open="popup.opened" ng-click="open()" validdate '; // don't remove the trailing space here
|
|
103
103
|
}
|
|
104
|
-
return
|
|
104
|
+
return FormMarkupHelperService.generateSimpleInput(
|
|
105
105
|
str,
|
|
106
106
|
processedAttrs.info,
|
|
107
107
|
processedAttrs.options
|
package/package.json
CHANGED