MikaelEdebro / vue-airbnb-style-datepicker

A VueJs datepicker with a similar look and functionality as the popular AirBnb datepicker.
https://mikaeledebro.gitbooks.io/vue-airbnb-style-datepicker/
MIT License
505 stars 105 forks source link

Setting icon is not override #70

Closed tucheng0552 closed 5 years ago

tucheng0552 commented 5 years ago

<div><img src="~/assets/image/icon/global_icon_swiper_arrow_left.png" alt="" slot="previous-month-icon"><AirbnbStyleDatepicker .../></div>

The icon is just displayed, no coverage. How to set it up correctly?

AND

I need to show the price below the date, can you add a slot for displaying custom content?

Thanks

MikaelEdebro commented 5 years ago

You're using the wrong syntax:

<airbnb-style-datepicker
  :trigger-element-id="'datepicker-trigger'"
  :mode="'single'"
  :date-one="dateOne"
  @date-one-selected="val => { dateOne = val }"
>
  <template slot="next-month-icon">Price: 100$</template>
</airbnb-style-datepicker>

You'll find the names of the slots on: https://mikaeledebro.gitbooks.io/vue-airbnb-style-datepicker/INSTALLATION.html#props-and-events