Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix date range all_day #1200

Merged
merged 3 commits into from
Nov 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 31 additions & 24 deletions resources/js/app/components/date-range/date-range.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,25 @@
v-model="start_date"
v-datepicker="true"
@change="onDateChanged(true, $event)"
v-if="ready"
>
</div>
</div>
<div :class="dateRangeClass()">
<span>{{ msgTo }}</span>
<div>
<input
type="text"
date="true"
:time="!all_day"
daterange="true"
v-model="end_date"
v-datepicker="true"
@change="onDateChanged(false, $event)"
v-if="start_date"
>
<template v-if="start_date">
<input
type="text"
date="true"
:time="!all_day"
daterange="true"
v-model="end_date"
v-datepicker="true"
@change="onDateChanged(false, $event)"
v-if="ready"
>
</template>
<input
type="text"
disabled="disabled"
Expand Down Expand Up @@ -164,6 +167,7 @@ export default {

data() {
return {
ready: false,
every_day: true,
start_date: '',
all_day: '',
Expand All @@ -190,20 +194,23 @@ export default {
},

mounted() {
this.range = this.source;
this.start_date = this.range?.start_date;
this.end_date = this.range?.end_date;
this.all_day = this.range?.params?.all_day;
this.every_day = this.range?.params?.every_day;
this.weekdays = this.range?.params?.weekdays || {
sunday: false,
monday: false,
tuesday: false,
wednesday: false,
thursday: false,
friday: false,
saturday: false
};
this.$nextTick(() => {
this.range = this.source;
this.start_date = this.range?.start_date;
this.end_date = this.range?.end_date;
this.all_day = this.range?.params?.all_day;
this.every_day = this.range?.params?.every_day;
this.weekdays = this.range?.params?.weekdays || {
sunday: false,
monday: false,
tuesday: false,
wednesday: false,
thursday: false,
friday: false,
saturday: false
};
this.ready = true;
});
},

methods: {
Expand Down
Loading