set the date from value in input