Fix first day of week not depending on locale
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
7771b27b55
commit
eb9b9d8f69
|
@ -11,7 +11,7 @@
|
||||||
<actor-auto-complete v-model="assignedTo" />
|
<actor-auto-complete v-model="assignedTo" />
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field :label="$t('Due on')">
|
<b-field :label="$t('Due on')">
|
||||||
<b-datepicker v-model="dueDate" />
|
<b-datepicker v-model="dueDate" :first-day-of-week="firstDayOfWeek" />
|
||||||
</b-field>
|
</b-field>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -99,5 +99,9 @@ export default class Todo extends Vue {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get firstDayOfWeek(): number {
|
||||||
|
return this.$dateFnsLocale?.options?.weekStartsOn || 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -53,6 +53,7 @@
|
||||||
id: 'begins-on-field',
|
id: 'begins-on-field',
|
||||||
'aria-next-label': $t('Next month'),
|
'aria-next-label': $t('Next month'),
|
||||||
'aria-previous-label': $t('Previous month'),
|
'aria-previous-label': $t('Previous month'),
|
||||||
|
'first-day-of-week': firstDayOfWeek,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
</b-datetimepicker>
|
</b-datetimepicker>
|
||||||
|
@ -73,6 +74,7 @@
|
||||||
id: 'ends-on-field',
|
id: 'ends-on-field',
|
||||||
'aria-next-label': $t('Next month'),
|
'aria-next-label': $t('Next month'),
|
||||||
'aria-previous-label': $t('Previous month'),
|
'aria-previous-label': $t('Previous month'),
|
||||||
|
'first-day-of-week': firstDayOfWeek,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
</b-datetimepicker>
|
</b-datetimepicker>
|
||||||
|
@ -1325,5 +1327,9 @@ export default class EditEvent extends Vue {
|
||||||
isOnline,
|
isOnline,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get firstDayOfWeek(): number {
|
||||||
|
return this.$dateFnsLocale?.options?.weekStartsOn || 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -59,7 +59,10 @@
|
||||||
: $t('Showing events before')
|
: $t('Showing events before')
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<b-datepicker v-model="dateFilter" />
|
<b-datepicker
|
||||||
|
v-model="dateFilter"
|
||||||
|
:first-day-of-week="firstDayOfWeek"
|
||||||
|
/>
|
||||||
<b-button
|
<b-button
|
||||||
@click="dateFilter = new Date()"
|
@click="dateFilter = new Date()"
|
||||||
class="reset-area"
|
class="reset-area"
|
||||||
|
@ -473,6 +476,10 @@ export default class MyEvents extends Vue {
|
||||||
get hideCreateEventButton(): boolean {
|
get hideCreateEventButton(): boolean {
|
||||||
return !!this.config?.restrictions?.onlyGroupsCanCreateEvents;
|
return !!this.config?.restrictions?.onlyGroupsCanCreateEvents;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get firstDayOfWeek(): number {
|
||||||
|
return this.$dateFnsLocale?.options?.weekStartsOn || 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue