@on-change="onStartChange" // how to pass custom properties ?
@on-change="onStartChange($event, $what, $andWhat, 'custom')" // how to pass custom properties ?
the default ...
// i only know about $event, but i dont know how about dateStr and instance
onStartChange(selectedDates, dateStr, instance, model) {
console.log('selectedDates', selectedDates)
console.log('dateStr', dateStr)
console.log('instance', instance)
console.log('model', model) // here i would like to custom
this.configs.end.minDate = dateStr
// this[`$model`].end // so i can make it like this line // because i have 4 flat-pickr to custom min date by the config
},
anyone have best trick ? or should i defined 4 function different on @on-change ? its possible to make it dynamic ( so my code can be clean ) ?
i want make it dynamic return to set data()
the default ...
anyone have best trick ? or should i defined 4 function different on @on-change ? its possible to make it dynamic ( so my code can be clean ) ?