Add inset_form to options and date picker macros
This commit is contained in:
@@ -28,6 +28,7 @@ export default {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
insetForm: Boolean,
|
||||
},
|
||||
|
||||
data: function() {
|
||||
@@ -36,6 +37,7 @@ export default {
|
||||
month: this.initialmonth,
|
||||
year: this.initialyear,
|
||||
name: this.nameTag,
|
||||
showValidation: !this.insetForm,
|
||||
}
|
||||
},
|
||||
|
||||
@@ -160,6 +162,8 @@ export default {
|
||||
|
||||
methods: {
|
||||
onInput: function(e) {
|
||||
this.showValidation = true
|
||||
|
||||
emitEvent('field-change', this, {
|
||||
value: this.formattedDate,
|
||||
name: this.name,
|
||||
|
@@ -22,6 +22,7 @@ export default {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
insetForm: Boolean,
|
||||
},
|
||||
|
||||
created: function() {
|
||||
@@ -36,7 +37,7 @@ export default {
|
||||
const showError = (this.initialErrors && this.initialErrors.length) || false
|
||||
return {
|
||||
showError: showError,
|
||||
showValid: !showError && !!this.initialValue,
|
||||
showValid: !this.insetForm && (!showError && !!this.initialValue),
|
||||
validationError: this.initialErrors.join(' '),
|
||||
value: this.initialValue,
|
||||
}
|
||||
|
Reference in New Issue
Block a user