vue-datetime
vue-datetime copied to clipboard
Method "format" has already been defined as a prop.
Versions
- vue: 2.6.10
- vue-datetime: 1.0.0-beta.10
- luxon: 1.16.0
Description
When using the library I get two console error messages:
[Vue warn]: Method "format" has already been defined as a prop.
[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "format"
Steps To Reproduce
I am using the component like this:
<datetime
v-validate="'required'"
v-model="date"
:format="dateFormat"
use12-hour
type="date"
name="fecha"
input-id="siniestro-auto_ubicacion-siniestro_fecha_input"
hidden-name="fecha" />
And dateFormat is defined on my data object like this:
dateFormat: luxon.DateTime.DATE_MED
The problem is because the method already exists in your project. Maybe in a mixin configuration.