Cleanup workarounds for flatpickr
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
edbf3109ef
commit
590edc4f82
|
@ -48,13 +48,13 @@
|
|||
</div>
|
||||
<div class="date-input">
|
||||
<datepicker
|
||||
v-model="dueDate"
|
||||
v-model="task.dueDate"
|
||||
@close="() => saveTask()"
|
||||
choose-date-label="Click here to set a due date"
|
||||
:disabled="taskService.loading || !canWrite"
|
||||
ref="dueDate"
|
||||
/>
|
||||
<a @click="() => {dueDate = task.dueDate = null;saveTask()}" v-if="dueDate && canWrite" class="remove">
|
||||
<a @click="() => {task.dueDate = null;saveTask()}" v-if="task.dueDate && canWrite" class="remove">
|
||||
<span class="icon is-small">
|
||||
<icon icon="times"></icon>
|
||||
</span>
|
||||
|
@ -388,9 +388,6 @@ export default {
|
|||
taskService: TaskService,
|
||||
task: TaskModel,
|
||||
relationKinds: relationKinds,
|
||||
// The due date is a seperate property in the task to prevent flatpickr from modifying the task model
|
||||
// in store right after updating it from the api resulting in the wrong due date format being saved in the task.
|
||||
dueDate: null,
|
||||
// We doubled the task color property here because verte does not have a real change property, leading
|
||||
// to the color property change being triggered when the # is removed from it, leading to an update,
|
||||
// which leads in turn to a change... This creates an infinite loop in which the task is updated, changed,
|
||||
|
@ -483,7 +480,6 @@ export default {
|
|||
},
|
||||
setActiveFields() {
|
||||
|
||||
this.dueDate = this.task.dueDate ? this.task.dueDate : null
|
||||
this.task.startDate = this.task.startDate ? this.task.startDate : null
|
||||
this.task.endDate = this.task.endDate ? this.task.endDate : null
|
||||
|
||||
|
@ -509,7 +505,6 @@ export default {
|
|||
// We're doing the whole update in a nextTick because sometimes race conditions can occur when
|
||||
// setting the due date on mobile which leads to no due date change being saved.
|
||||
this.$nextTick(() => {
|
||||
this.task.dueDate = this.dueDate
|
||||
this.task.hexColor = this.taskColor
|
||||
|
||||
// If no end date is being set, but a start date and due date,
|
||||
|
|
Reference in New Issue