Skip to content

Commit

Permalink
update usage
Browse files Browse the repository at this point in the history
  • Loading branch information
8788 committed Apr 10, 2019
1 parent 8d83a53 commit e2c4e81
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ $ npm install vue-date-picker --save
<template>
<div class="demo">
<datepicker :readonly="true" format="YYYY-MM-DD" name="date1"></datepicker>
<datepicker value="2018-9-5" format="YYYY-M-D" name="date2"></datepicker>
<datepicker :readonly="true" format="MMM/D/YYYY" name="date3" :input-attr="{ 'data-test': 'value' }"></datepicker>
<datepicker value="2018-9-5" format="YYYY-M-D" name="date2" :input-attr="{ 'data-test': 'value' }"></datepicker>
<datepicker :readonly="true" format="MMM/D/YYYY" name="date3" :disabled-date="disabledDate"></datepicker>
</div>
</template>

Expand All @@ -31,6 +31,11 @@ import datepicker from 'vue-date-picker'
export default {
components: {
datepicker
},
methods: {
disabledDate (date) {
return date.getTime() < Date.now()
}
}
}
</script>
Expand Down

0 comments on commit e2c4e81

Please sign in to comment.