pacvuedaterange
v2.0.2
Published
``` npm install pacvuedaterange --save ``` ``` // main.js import pacvuedaterange from 'pacvuedaterange' import 'pacvuedaterange/dist/daterangepicker.css' vue.use(pacvuedaterange) ``` ``` ``` ## demo.js ``` <template> <div class="demo">
Downloads
637
Readme
Project setup
npm install pacvuedaterange --save
// main.js
import pacvuedaterange from 'pacvuedaterange'
import 'pacvuedaterange/dist/daterangepicker.css'
vue.use(pacvuedaterange)
demo.js
<template>
<div class="demo">
<date-range-picker
:minDate="minDate"
:maxDate="maxDate"
v-model="dateRange"
:isCompare="true"
:compareSummary="true"
:showCompareCheck="true"
:showSummaryCheck="true"
:compareDate="compareDate"
@update="updateValues"
@compareTime="compareTime"
@toggle="checkOpen"
>
</date-range-picker>
</div>
</template>
<script>
export default {
name: 'demo',
data () {
return {
minDate: "",
maxDate: new Date(),
dateRange: {
startDate: "2020-11-10",
endDate: "2020-11-20",
}
}
},
methods:{
updateValues(values) {
console.log("event: update", { ...values });
// this.dateRange.startDate = format(
// values.startDate,
// "yyyy-mm-dd HH:MM:ss"
// );
// this.dateRange.endDate = format(
// values.endDate,
// "yyyy-mm-dd HH:MM:ss"
// );
},
compareTime(value) {
console.log("asssssssss");
console.log(value);
},
checkOpen(open) {
console.log("event: open", open);
},
}
}
</script>
```