diff --git a/package-lock.json b/package-lock.json index f98a66e..59bdd33 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "vue3-excel-editor", - "version": "1.0.7", + "version": "1.0.8", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 9de80fc..d8eff6a 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vue3-excel-editor", "email": "apple.6502@gmail.com", "description": "Vue3 plugin for displaying and editing the array-of-object in Excel style", - "version": "1.0.7", + "version": "1.0.8", "main": "src/main.js", "dependencies": { "@vuepic/vue-datepicker": "^3.3.0", diff --git a/src/VueExcelColumn.vue b/src/VueExcelColumn.vue index 85a57f1..786e8d4 100644 --- a/src/VueExcelColumn.vue +++ b/src/VueExcelColumn.vue @@ -116,30 +116,36 @@ export default { break case 'date': allowKeys = allowKeys || ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-'] + /* if (!validate) validate = (val) => { if (val === '') return '' // if (!moment(val, 'YYYY-MM-DD', true).isValid()) return this.$parent.localizedLabel.invalidInputValue if (!/^\d{4}-\d{2}-\d{2}$/.test(val)) return this.$parent.localizedLabel.invalidInputValue return '' } + */ break case 'datetime': allowKeys = allowKeys || ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', ' ', ':'] + /* if (!validate) validate = (val) => { if (val === '') return '' // if (!moment(val, 'YY-MM-DD hh:mm', true).isValid()) return this.$parent.localizedLabel.invalidInputValue if (!/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$/.test(val)) return this.$parent.localizedLabel.invalidInputValue return '' } + */ break case 'datetimesec': allowKeys = allowKeys || ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', ' ', ':'] + /* if (!validate) validate = (val) => { if (val === '') return '' // if (!moment(val, 'YY-MM-DD hh:mm:ss', true).isValid()) return this.$parent.localizedLabel.invalidInputValue if (!/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(val)) return this.$parent.localizedLabel.invalidInputValue return '' } + */ break case 'datetick': allowKeys = allowKeys || ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', ' ', ':']