mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 23:51:09 +03:00
[system_tracking] Disable dates on right prior to dates on left
This commit is contained in:
parent
dbb8c649de
commit
aec91bc13e
@ -12,7 +12,8 @@ export default
|
||||
return {
|
||||
restrict: 'E',
|
||||
scope: {
|
||||
date: '='
|
||||
date: '=',
|
||||
minDate: '='
|
||||
},
|
||||
templateUrl: '/static/js/system-tracking/date-picker/date-picker.partial.html',
|
||||
link: function(scope, element, attrs) {
|
||||
@ -21,6 +22,12 @@ export default
|
||||
// with two-way binding.
|
||||
var mustUpdateValue = true;
|
||||
|
||||
scope.$watch('minDate', function(newValue) {
|
||||
if (newValue) {
|
||||
$('.date', element).systemTrackingDP('setStartDate', newValue.toString());
|
||||
}
|
||||
});
|
||||
|
||||
scope.$watch('date', function(newValue) {
|
||||
if (newValue) {
|
||||
mustUpdateValue = false;
|
||||
|
@ -12,7 +12,7 @@
|
||||
</div>
|
||||
<div class="FactModulePickers-dateContainer FactModulePickers-dateContainer--right" ng-show="compareMode == 'single-host'">
|
||||
<span class="FactModulePickers-label">{{ factModulePickersLabelRight }}</span>
|
||||
<date-picker date="rightDate"></date-picker>
|
||||
<date-picker date="rightDate" min-date="leftDate"></date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user