I have a working instance of Vue Datepicker, which is functional to the point of picking a date and logging it on select within the console.
The problem is that it logs as Fri Oct 18 2019 15:01:00 GMT-0400 but I need to send the formatted date portion of this like 2019-10-18 only.
This is vuejs-datepicker library and I can't seem to get anything to work with this:
customFormatter(date) {
return moment(date).format('MMMM Do YYYY, h:mm:ss a');
}
What exactly am I doing wrong here?
<datepicker :value="date" @selected="CallDateFunction"></datepicker>
date(){
return {
date: '',
...
CallDateFunction(date){
console.log(date);
}