I'm creating a web app similar to a classic peer-2-peer lending platform.
In the form to publish the loan request, I connected a slider to the input in which to enter the requested amount.
However, I have two problems: the slider is set with a minimum of $ 100 and a maximum of $ 1000.
I am attaching two screen to better understand:
By continuing to fill in the form, if you enter an amount greater than that allowed, the default value becomes the previous one, I would like it to be the maximum, that is $ 1000
Furthermore, I would like that the tenor also affects the interest rate, the more time you pay off the loan, the more the interest increases. At the default value of the tenor, ie 6 months, no change. For each increase + 2% and for each decrease -2%.
All these data are then saved in the MySQL table.
Codesandbox: https://codesandbox.io/s/priceless-gould-30uuf?file=/src/App.js