Skip to content

Commit b442f3a

Browse files
author
Charlie Kassel
committed
pull master
2 parents 79ca5e3 + 03c18c5 commit b442f3a

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,19 @@ var state = {
224224
</script>
225225
<datepicker :highlighted="state.highlighted"></datepicker>
226226
```
227-
227+
## Slots
228+
229+
Sometimes you need to show custom content before the header for the calendar.
230+
For such cases you can use the named slot 'beforeCalendarHeader.
231+
An example would be to use bootstrap's `input-group-prepend` and `input-group-append`
232+
to show some custom text:
233+
``` html
234+
<datepicker :bootstrap-styling="true">
235+
<div slot="beforeCalendarHeader" class="calender-header">
236+
Choose a Date
237+
</div>
238+
</datepicker>
239+
```
228240

229241
## Translations
230242

example/Demo.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
:bootstrapStyling="true"
1616
:calendarButton="true"
1717
:clearButton="true"
18-
></datepicker>
18+
>
19+
</datepicker>
1920
<code>
2021
&lt;datepicker placeholder="Select Date"&gt;&lt;/datepicker&gt;
2122
</code>

src/components/Datepicker.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
@showCalendar="showCalendar"
2323
/>
2424

25+
2526
<!-- Day View -->
2627
<picker-day
2728
v-if="allowedToShowView('day')"

0 commit comments

Comments
 (0)