I think this what you want,
$("#30min,#45min" ).click(function() {
var that = $(this);
$( "input#start_time, input#end_time" ).each(function(e){
var text = $(this).val();
var textArr = text.split(":");
textArr[1] = that.val();
$(this).val(textArr[0]+':'+textArr[1]);
})
});
Please see the fiddle