score:0

var newsearchparams = updatequerystringparameter(props.history.location.search, "timestart", startdate);

props.history.push(newsearchparams);

and then update your state with setstate.

if your component rendering first time , pass default value to state from queryparam.

function updatequerystringparameter(uri, key, value) {
    let re = new regexp("([?&])" + key + "=.*?(&|$)", "i");
    let separator = uri.indexof('?') !== -1 ? "&" : "?";
    if (uri.match(re))
        return uri.replace(re, '$1' + key + "=" + value + '$2');
    else
        return uri + separator + key + "=" + value;
}

Related Query

More Query from same tag