Fixed broken onchange for changing date ranges