From 4df6a1f197c94ecded90b6bf49371bcc074f2f8c Mon Sep 17 00:00:00 2001 From: MaryamAlkhater Date: Tue, 3 Dec 2024 17:33:03 -0500 Subject: [PATCH] feat: allow Monday to be the first column in date picker --- packages/nc-gui/components/nc/DatePicker.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui/components/nc/DatePicker.vue b/packages/nc-gui/components/nc/DatePicker.vue index 693851359e..8b8cd80f6d 100644 --- a/packages/nc-gui/components/nc/DatePicker.vue +++ b/packages/nc-gui/components/nc/DatePicker.vue @@ -9,6 +9,7 @@ interface Props { type: 'date' | 'time' | 'year' | 'month' isOpen: boolean showCurrentDateOption?: boolean | 'disabled' + isMondayFirst?: boolean } const props = withDefaults(defineProps(), { @@ -18,6 +19,7 @@ const props = withDefaults(defineProps(), { isCellInputField: false, type: 'date', isOpen: false, + isMondayFirst: true, }) const emit = defineEmits(['update:selectedDate', 'update:pageDate', 'update:selectedWeek', 'currentDate']) // Page date is the date we use to manage which month/date that is currently being displayed @@ -131,7 +133,7 @@ onMounted(() => { v-model:page-date="localStatePageDate" v-model:selected-date="localStateSelectedDate" :picker-type="pickerType" - :is-monday-first="false" + :is-monday-first="props.isMondayFirst" is-cell-input-field size="medium" :show-current-date-option="showCurrentDateOption"