Use the new datepicker for start date
All checks were successful
continuous-integration/drone/pr Build is passing
All checks were successful
continuous-integration/drone/pr Build is passing
This commit is contained in:
parent
390afe1f81
commit
972eb5acfc
|
@ -134,7 +134,7 @@ export default {
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
validator: prop => prop instanceof Date || prop === null
|
validator: prop => prop instanceof Date || prop === null || typeof prop === 'string'
|
||||||
},
|
},
|
||||||
chooseDateLabel: {
|
chooseDateLabel: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -150,7 +150,7 @@ export default {
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
value(newVal) {
|
value(newVal) {
|
||||||
this.date = newVal
|
this.date = new Date(newVal)
|
||||||
},
|
},
|
||||||
flatPickrDate(newVal) {
|
flatPickrDate(newVal) {
|
||||||
this.date = new Date(newVal)
|
this.date = new Date(newVal)
|
||||||
|
|
|
@ -80,18 +80,14 @@
|
||||||
Start Date
|
Start Date
|
||||||
</div>
|
</div>
|
||||||
<div class="date-input">
|
<div class="date-input">
|
||||||
<flat-pickr
|
<datepicker
|
||||||
:class="{ 'disabled': taskService.loading}"
|
|
||||||
:config="flatPickerConfig"
|
|
||||||
:disabled="taskService.loading || !canWrite"
|
|
||||||
@on-close="() => saveTask()"
|
|
||||||
class="input"
|
|
||||||
placeholder="Click here to set a start date"
|
|
||||||
ref="startDate"
|
|
||||||
v-model="task.startDate"
|
v-model="task.startDate"
|
||||||
>
|
@close="() => saveTask()"
|
||||||
</flat-pickr>
|
choose-date-label="Click here to set a start date"
|
||||||
<a @click="() => {task.startDate = null;saveTask()}" v-if="task.startDate && canWrite">
|
:disabled="taskService.loading || !canWrite"
|
||||||
|
ref="startDate"
|
||||||
|
/>
|
||||||
|
<a @click="() => {task.startDate = null;saveTask()}" v-if="task.startDate && canWrite" class="remove">
|
||||||
<span class="icon is-small">
|
<span class="icon is-small">
|
||||||
<icon icon="times"></icon>
|
<icon icon="times"></icon>
|
||||||
</span>
|
</span>
|
||||||
|
|
Reference in New Issue
Block a user