1.1.7 • Published 6 years ago
vue_calendar_select v1.1.7
vue_calendar_select
select start_date and end_date in datepicker
Install
$ npm install vue_calendar_select --save
Usage
setLimitDays prop if passed should be a YYYY/MM/DD, YYYY/MM/DD
<script>
const setLimitDays = ['2017/01/01', '2017/12/31'];
</script>
<CalendarSelect :setLimitDays="setLimitDays"></CalendarSelect>
setCurrentDays prop if passed should be a YYYY/MM/DD, YYYY/MM/DD
<script>
const setCurrentDays = ['2017/01/01', '2017/12/31'];
</script>
<CalendarSelect :setCurrentDays="setCurrentDays"></CalendarSelect>
datepickerStatus prop if pass 'disable', datepicker will disable and get to disable class style
<script>
const datepickerStatus = 'disable';
</script>
<CalendarSelect :datepickerStatus="datepickerStatus"></CalendarSelect>
Emits events, receive startDate and endDate value from inside
<CalendarSelect @sendDate="receiveDate"></CalendarSelect>
<script>
function receiveDate({startDay, endDay} = {}){
console.log(`startDay: ${startDay}`);
console.log(`endDay: ${endDay}`);
}
</script>
Available props
Prop | Type | Default | Description |
---|---|---|---|
setLimitDays | Array | '', '' | set limit start day and end day |
setCurrentDays | Array | '', '' | set current start day and end day |
datepickerStatus | String | '' | set 'disable' prop for disable datepicker |
Events
These events are emitted on actions in the datepicker
Event | Output | Description |
---|---|---|
sendDate | startDay, endDay | get current startDay and endDay value |
Log
2017/12/18
- remove
placeholderTextStartDay
,placeholderTextEndDay
props. - add
datepickerStatus
prop. - It world change datepicker by year on double arrow button.
2017/12/20
- change prop
setDays
tosetLimitDays
- add
setCurrentDays
prop.
2017/12/29
- remove component default value in setLimitDays and setCurrentDays