I\'ve created a function that return a substraction or an addition from current Date, and set the result in the min or max of date input :
My function :