Skip to content

Commit 2c0961c

Browse files
author
Charlie Kassel
committed
Merge branch 'master' of github.com:charliekassel/vuejs-datepicker
* 'master' of github.com:charliekassel/vuejs-datepicker: Fix missing descriptions in props table Add calendarClass as prop to allow for customization of calendar component
2 parents 83162ea + 476268c commit 2c0961c

File tree

2 files changed

+28
-24
lines changed

2 files changed

+28
-24
lines changed

README.md

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -58,27 +58,28 @@ Inline always open version
5858
```
5959
## Available props
6060

61-
| Prop | Type | Default | Description |
62-
|-----------------------|--------------|-------------|------------------------------------------|
63-
| value | Date/String | | Date value of the datepicker |
64-
| name | String | | Input name property |
65-
| id | String | | Input id |
66-
| format | String | dd MMM yyyy | Date formatting string |
67-
| language | String | en | Translation for days and months |
68-
| disabled | Object | | See below for configuration |
69-
| placeholder | String | | Input placeholder text |
70-
| inline | Boolean | | To show the datepicker always open |
71-
| input-class | String|Object| | CSS class applied to the input el |
72-
| wrapper-class | String|Object| | CSS class applied to the outer div |
73-
| monday-first | Boolean | false | To start the week on Monday |
74-
| clear-button | Boolean | false | Show an icon for clearing the date |
75-
| clear-button-icon | String | | Use icon for button (ex: fa fa-times) |
76-
| calendar-button | Boolean | false | Show an icon that that can be clicked |
77-
| calendar-button-icon | String | | Use icon for button (ex: fa fa-calendar) |
78-
| bootstrapStyling | Boolean | false | Output bootstrap styling classes |
79-
| initial-view | String | 'day' | If 'month' or 'year', open on that view |
80-
| disabled-picker | Boolean | false | If true, disable Datepicker on screen |
81-
| required | Boolean | false | Sets html required attribute on input |
61+
| Prop | Type | Default | Description |
62+
|-----------------------|---------------|-------------|------------------------------------------|
63+
| value | Date\|String | | Date value of the datepicker |
64+
| name | String | | Input name property |
65+
| id | String | | Input id |
66+
| format | String | dd MMM yyyy | Date formatting string |
67+
| language | String | en | Translation for days and months |
68+
| disabled | Object | | See below for configuration |
69+
| placeholder | String | | Input placeholder text |
70+
| inline | Boolean | | To show the datepicker always open |
71+
| calendar-class | String\|Object| | CSS class applied to the calendar el |
72+
| input-class | String\|Object| | CSS class applied to the input el |
73+
| wrapper-class | String\|Object| | CSS class applied to the outer div |
74+
| monday-first | Boolean | false | To start the week on Monday |
75+
| clear-button | Boolean | false | Show an icon for clearing the date |
76+
| clear-button-icon | String | | Use icon for button (ex: fa fa-times) |
77+
| calendar-button | Boolean | false | Show an icon that that can be clicked |
78+
| calendar-button-icon | String | | Use icon for button (ex: fa fa-calendar) |
79+
| bootstrapStyling | Boolean | false | Output bootstrap styling classes |
80+
| initial-view | String | 'day' | If 'month' or 'year', open on that view |
81+
| disabled-picker | Boolean | false | If true, disable Datepicker on screen |
82+
| required | Boolean | false | Sets html required attribute on input |
8283

8384
## Events
8485

src/components/Datepicker.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</div>
1919

2020
<!-- Day View -->
21-
<div class="vdp-datepicker__calendar" v-show="showDayView" v-bind:style="calendarStyle">
21+
<div :class="[calendarClass, 'vdp-datepicker__calendar']" v-show="showDayView" v-bind:style="calendarStyle">
2222
<header>
2323
<span
2424
@click="previousMonth"
@@ -40,7 +40,7 @@
4040
</div>
4141

4242
<!-- Month View -->
43-
<div class="vdp-datepicker__calendar" v-show="showMonthView" v-bind:style="calendarStyle">
43+
<div :class="[calendarClass, 'vdp-datepicker__calendar']" v-show="showMonthView" v-bind:style="calendarStyle">
4444
<header>
4545
<span
4646
@click="previousYear"
@@ -60,7 +60,7 @@
6060
</div>
6161

6262
<!-- Year View -->
63-
<div class="vdp-datepicker__calendar" v-show="showYearView" v-bind:style="calendarStyle">
63+
<div :class="[calendarClass, 'vdp-datepicker__calendar']" v-show="showYearView" v-bind:style="calendarStyle">
6464
<header>
6565
<span @click="previousDecade" class="prev"
6666
v-bind:class="{ 'disabled' : previousDecadeDisabled(currDate) }">&lt;</span>
@@ -115,6 +115,9 @@ export default {
115115
inline: {
116116
type: Boolean
117117
},
118+
calendarClass: {
119+
type: [String, Object]
120+
},
118121
inputClass: {
119122
type: [String, Object]
120123
},

0 commit comments

Comments
 (0)