diff --git a/package.json b/package.json index 2cccc18..942444d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@uoe-eng/tabularasa", - "version": "1.26.8", + "version": "1.26.9", "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build --target lib --name tabularasa src/index.js", diff --git a/src/components/fields/DateInput.vue b/src/components/fields/DateInput.vue index 11f518b..33f5227 100644 --- a/src/components/fields/DateInput.vue +++ b/src/components/fields/DateInput.vue @@ -8,6 +8,7 @@ :id="'input' + fieldValue" v-model="date" date-format="yy-mm-dd" + :show-button-bar="true" v-bind="properties" :class="{ 'p-invalid': errorMessage }" @update:model-value="onUpdate($event)" @@ -61,6 +62,9 @@ export default { } // Send event as ISO8601 string,removing time part emit('update', event.toISOString()) + } else { + // Date value cleared + emit('update', event) } } return { errorMessage, fieldValue, onUpdate } @@ -77,10 +81,7 @@ export default { return date }, set(newDate) { - // Ignore falsey values - if (newDate) { - this.fieldValue = newDate - } + this.fieldValue = newDate }, }, },