Konvertieren von Datum-format in Javascript mit VueJS

Habe ich ein date-format "19 Okt 2017" und wollen es zu konvertieren in dieses format "20171019"

Gibt es einen schnellen Weg, dies zu tun? Ich bin mit FlatPickr in VueJs. Bitte meinen code unten, wenn Ihr keine Hilfe.

Dank

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;
      })
    }
  }
InformationsquelleAutor | 2017-10-12
Schreibe einen Kommentar