diff --git a/packages/nc-gui/components/dlg/ViewCreate.vue b/packages/nc-gui/components/dlg/ViewCreate.vue
index a5b292a5af..6b7c84d3e8 100644
--- a/packages/nc-gui/components/dlg/ViewCreate.vue
+++ b/packages/nc-gui/components/dlg/ViewCreate.vue
@@ -225,6 +225,13 @@ async function onSubmit() {
}
}
+const addCalendarRange = async () => {
+ form.calendarRange.push({
+ fk_from_column_id: viewSelectFieldOptions.value[0],
+ fk_to_column_id: null,
+ })
+}
+
const isMetaLoading = ref(false)
onMounted(async () => {
@@ -424,7 +431,7 @@ onMounted(async () => {
/>
-
+
{{ $t('labels.organiseBy') }}
@@ -474,7 +481,23 @@ onMounted(async () => {
+
{
+ form.calendarRange = form.calendarRange.filter((_, i) => i !== index)
+ }
+ "
+ >
+
+
+
+
+ Add another date field
+
diff --git a/packages/nc-gui/components/smartsheet/calendar/index.vue b/packages/nc-gui/components/smartsheet/calendar/index.vue
index 4d17eb05c5..402a796f1c 100644
--- a/packages/nc-gui/components/smartsheet/calendar/index.vue
+++ b/packages/nc-gui/components/smartsheet/calendar/index.vue
@@ -57,6 +57,8 @@ const {
const showSideMenu = ref(true)
+const calendarRangeDropdown = ref(false)
+
const router = useRouter()
const route = useRoute()
@@ -152,7 +154,7 @@ const headerText = computed(() => {
-
+
{{ headerText }}
@@ -161,7 +163,7 @@ const headerText = computed(() => {
-
+
{
}
}
-// To add new calendar range
-const addCalendarRange = async () => {
- _calendar_ranges.value.push({
- fk_from_column_id: '',
- fk_to_column_id: undefined,
- })
-}
-
const dateFieldOptions = computed(() => {
return (
meta.value?.columns
@@ -98,6 +90,20 @@ const dateFieldOptions = computed(() => {
})) ?? []
)
})
+
+// To add new calendar range
+const addCalendarRange = async () => {
+ _calendar_ranges.value.push({
+ fk_from_column_id: dateFieldOptions.value[0],
+ fk_to_column_id: null,
+ })
+}
+
+const removeRange = async (id: number) => {
+ _calendar_ranges.value = _calendar_ranges.value.filter((_, i) => i !== id)
+
+ await saveCalendarRanges()
+}
@@ -113,8 +119,8 @@ const dateFieldOptions = computed(() => {
-
-
+
+
{{ $t('labels.organiseBy') }}
@@ -184,7 +190,14 @@ const dateFieldOptions = computed(() => {
+
+
+
+
+
+ Add another date field
+