How to add a date range in form and calculate amount?