mengxiong10 / vue2-datepicker

A datepicker / datetimepicker component for Vue2
https://mengxiong10.github.io/vue2-datepicker/index.html
MIT License
1.51k stars 405 forks source link

[Bug] [Vue warn]: Error in v-on handler: "TypeError: handler.apply is not a function" #678

Closed bombxdev closed 2 years ago

bombxdev commented 2 years ago
[Vue warn]: Error in v-on handler: "TypeError: handler.apply is not a function"

found in

---> <DatePicker>
       <ProductionOrder> at resources/assets/js/components/mcpd/ProductionOrder.vue
         <Root>

Tell about your platform

My Code is like this

<template>
  <div>
  <date-picker v-model="receivingDate" @change="fetchMcpdByReceivingDate" placeholder="กรุณาเลือกวันที่" valueType="format" format="YYYY-MM-DD"></date-picker>
  </div>
</template>

<script>

import DatePicker from 'vue2-datepicker';
import 'vue2-datepicker/index.css';

export default {
    components:{
        DatePicker
    },
   data : {
        return {
            receivingDate: null,
        }
   }
},

Anyone can help me fix this issue and what's wrong with my code?

mengxiong10 commented 2 years ago

fetchMcpdByReceivingDate should be a function in methods

methods: {
  fetchMcpdByReceivingDate(date) {}
}