To view demo examples locally, clone the repo and run npm install && npm run serve
npm install @sum.cumo/vue-datepicker --save
yarn add @sum.cumo/vue-datepicker
Download the latest release from github
<template>
<DatePicker v-model="date"></DatePicker>
</template>
<script>
import DatePicker from '@sum.cumo/vue-datepicker'
import '@sum.cumo/vue-datepicker/dist/vuejs-datepicker.css'
export default {
name: 'Example',
components: {
DatePicker,
},
data(){
return {
date: new Date()
}
}
}
</script>To load the CSS you can import it inside the script tag like above. Another option is to use webpacks css-loader
<style>
@import '~@sum.cumo/vue-datepicker/dist/vuejs-datepicker.css';
</style>If you use SASS you can directly import the src file.
<style lang="scss">
@import '~@sum.cumo/vue-datepicker/src/styles/style.scss';
</style>