I need to convert a date format from 19 Oct 2017
to 20171019
. Is there a way to do this quickly? I am using FlatPickr
in VueJs. Here is the code snippet for reference:
import flatPickr from 'vue-flatpickr-component';
import 'flatpickr/dist/flatpickr.css';
import Navigation from './Navigation'
import bus from '../bus'
export default {
data() {
return {
showPanel: false,
isClosed: false,
arrival: null,
departure: null,
config: {
dateFormat: "Ymd"
}
}
},
components: {
flatPickr
},
methods: {
closeMenu: function() {
this.$store.state.showBooking = false;
}
},
mounted() {
bus.$on('show-booking', () => {
this.showPanel = true;
})
}
}