benitolopez / hotel-datepicker

Date range picker for hotels
https://hoteldatepicker.org
MIT License
307 stars 95 forks source link

When select the dates from the picker need to assign both check-in and check-out dates separately to another input field values #176

Closed Nuwananj closed 9 months ago

Nuwananj commented 9 months ago

In my case, there are two input fields as below,

need to assign selected Check-in date to "formattedCheckin" value and Check_out date to "formattedCheckout" value, how to do that.

benitolopez commented 9 months ago

Hello,

Sorry, but this repo is for reporting bugs only. I suggest you use StackOverflow if you need help with custom code.

Just as a quick example (can't help you with that), here I set the value of two hidden fields when a range is selected: https://github.com/wp-hotelier/wp-hotelier/blob/main/assets/js/frontend/hotelier-init-datepicker.js#L96