Added logic to change time slider when input changes