insert/update starttime or endtime when user click buttons