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