fix(preferences(js)): don't filter vacation start date

This commit is contained in:
Francis Lachapelle
2022-07-15 11:14:22 -04:00
parent 0720dc44fd
commit 2ae03d5095
2 changed files with 1 additions and 16 deletions

View File

@@ -1124,10 +1124,10 @@
<md-datepicker
name="vacationStartDate"
label:md-placeholder="Enter date"
ng-change="app.toggleVacationEndDate()"
ng-disabled="!app.preferences.defaults.Vacation.startDateEnabled"
ng-required="app.preferences.defaults.Vacation.startDateEnabled"
ng-model="app.preferences.defaults.Vacation.startDate"
md-date-filter="app.validateVacationStartDate"
sg-reset-on-disabled="sg-reset-on-disabled"><!-- datepicker --></md-datepicker>
</md-input-container>
</div>

View File

@@ -563,21 +563,6 @@
}
};
this.validateVacationStartDate = function(date) {
var d = vm.preferences.defaults, r = true;
if (d &&
d.Vacation &&
d.Vacation.enabled) {
if (d.Vacation.startDateEnabled) {
r = (!d.Vacation.endDateEnabled ||
!d.Vacation.endDate ||
date.getTime() <= d.Vacation.endDate.getTime());
}
}
return r;
};
this.validateVacationEndDate = function(date) {
var d = vm.preferences.defaults, r = true;
if (d &&