ZestfulNation / vue-hotel-datepicker

A VueJS v2 responsive date range picker. Displays the number of nights selected and allow several useful options like custom check-in/check-out rules, localization support and more.
https://zestfulnation.github.io/vue-hotel-datepicker/
MIT License
840 stars 220 forks source link

Change/set check-in and check-out dates programmatically #209

Closed adnanashraf1 closed 4 years ago

adnanashraf1 commented 4 years ago

Description

I want to open the date picker with a pre-selected date range. For example, I've two (home & show) pages. The user selects the date range from the home page and submits the form which redirects to the show page. Now I want to populate the date picker with that selected range on show page. It would be great if we can set check-in and check-out values with props.

Datepicker Version

I'm using 3.0.9 version.

matiasperrone commented 4 years ago

Try to update to v3.0.10, https://github.com/krystalcampioni/vue-hotel-datepicker/releases/tag/v3.0.10

adnanashraf1 commented 4 years ago

Thank you for your response. As per your suggestion, I've updated my version from 3.0.9 to 3.0.10 but I'm still not able to set the date range before opening the date picker. I want to change the check-in and check-out date programmatically. It would be great if you will provide me an example of how to it.

matiasperrone commented 4 years ago

The props that you are looking for are "startingDateValue" and "endingDateValue"