So I have a reservation program where client can pick two dates. As he picks two dates I need to count how much he will need to pay for those days. For example, he picks 3 days in between then it shows without submitting an order that he needs to pay x amount of money for those days.
I tried refresh button, Javascript and none of that worked for me.
{{ Form::date('date_from', \Carbon\Carbon::now()->format('d-m-Y'), ['class' => 'form-control', 'required' => 'required', 'placeholder' => '']) }}
{{ Form::date('date_to', \Carbon\Carbon::now()->format('d-m-Y'), ['class' => 'form-control', 'required' => 'required']) }}
The expected result is: Client picks 4 days it shows that those 4 days costs x amount of money, so the client can decide how many days he can pick. If he picks 3 days in-between dates, it calculates 3 days price. Formula: days-in-between * price-per-day