damienroche / vue-mj-daterangepicker

🗓Vue.js date range picker with multiples ranges and presets (vue 2.x)
https://damienroche.github.io/vue-mj-daterangepicker/
60 stars 39 forks source link

Show the range from begin month #24

Closed eleave closed 4 years ago

eleave commented 4 years ago

Hi, Damien! You made a great date range picker! I have a question about start and finish range date begin.

What's the point? Today is 09 March. I set the date range from 15 March to 05 April and save it. Then I refresh the page, after page is loaded I see that current month setted as April (because the end range is next month and i do not see March), it would be better if calendar could begin from Start range - March!

What I see when page is loaded: (End of the range) image

What i expected to see: (Start of the range) image

I try to use begin param with a start date, but it does not help.

<date-range-picker 
    ref="rangepicker"
    :begin="'{{ $item->start }}'"
    :from="'{{ $item->start }}'" 
    :to="'{{ $item->finish }}'" 
    :past="false" 
/>

Btw, it would be useful to add a Home icon (or a method to quickly back to the current day, but without it selected)

damienroche commented 4 years ago

Hi @eleave thanks for you feedback i will add a rangeDisplayed Prop so you can select which range to display between to and from

damienroche commented 4 years ago

available now in v0.1.11