Skip to content

Commit

Permalink
Slightly improve error check on maintenance edit page
Browse files Browse the repository at this point in the history
  • Loading branch information
louislam committed May 7, 2023
1 parent d23cb0b commit aa8454b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/pages/EditMaintenance.vue
Original file line number Diff line number Diff line change
Expand Up @@ -218,17 +218,17 @@

<!-- Date Range -->
<div class="my-3">
<label class="form-label">{{ $t("Effective Date Range") }}</label>
<label v-if="maintenance.strategy !== 'single'" class="form-label">{{ $t("Effective Date Range") }}</label>

<div class="row">
<div class="col">
<div class="mb-2">{{ $t("startDateTime") }}</div>
<input v-model="maintenance.dateRange[0]" type="datetime-local" class="form-control">
<input v-model="maintenance.dateRange[0]" type="datetime-local" class="form-control" :required="maintenance.strategy === 'single'">
</div>

<div class="col">
<div class="mb-2">{{ $t("endDateTime") }}</div>
<input v-model="maintenance.dateRange[1]" type="datetime-local" class="form-control">
<input v-model="maintenance.dateRange[1]" type="datetime-local" class="form-control" :required="maintenance.strategy === 'single'">
</div>
</div>
</div>
Expand Down Expand Up @@ -272,7 +272,6 @@ export default {
selectedStatusPages: [],
dark: (this.$root.theme === "dark"),
neverEnd: false,
minDate: this.$root.date(dayjs()) + " 00:00",
lastDays: [
{
langKey: "lastDay1",
Expand Down Expand Up @@ -411,7 +410,7 @@ export default {
cron: "30 3 * * *",
durationMinutes: 60,
intervalDay: 1,
dateRange: [ this.minDate ],
dateRange: [],
timeRange: [{
hours: 2,
minutes: 0,
Expand Down

0 comments on commit aa8454b

Please sign in to comment.