Display # of days from datepicker onChange events

I don’t know what I am doing- we can start there. I am looking to display a value based on the difference of 2 days a user chooses (they are choosing rental days for equipment). I believe I need to write code pertaining to an onChange event that occurs to my 2 date pickerfields… something like #datePicker1 - #datePicker2 = Display text “#text5” Can someone get me started on the code for this? This value ultimately needs added to a database as well…