export default {
data(){
time:new Date(this.data.time),
},
created(){
this.getData();
},
methods:{
getData(){
this.sendHttp(/api/data/${this.data})
.then((response) => {
this.data = response.data;
this.time = moment(this.data.time).format("YYYY-MM-DD HH:mm");
}) .catch((error) => {
console.log(error);
})
},
},
}
the image show the time saved in the database
it does not highlighted the date selected in the panel. For example, it should be highlighted the the date 2022-02-11 00:00 that had been saved in the database.
It does not show the date that has been save into the database. (for edit)
<date-picker class="wide-date" v-model="time" type="datetime" format="YYYY-MM-DD HH:mm" @input="selecttime" >
export default { data(){ time:new Date(this.data.time), }, created(){ this.getData(); }, methods:{ getData(){ this.sendHttp(
/api/data/${this.data}
) .then((response) => { this.data = response.data; this.time = moment(this.data.time).format("YYYY-MM-DD HH:mm"); }) .catch((error) => { console.log(error); }) }, }, } the image show the time saved in the databaseit does not highlighted the date selected in the panel. For example, it should be highlighted the the date 2022-02-11 00:00 that had been saved in the database.