$("#<%= divid_for(@calentry.object,"new_calentry") %>").replaceWith("<div id=\"<%= divid_for(@calentry.object,"new_calentry") %>\"><%=escape_javascript( render :partial=>"nested_form" ,:object=>@calentry) %></div>");
  $('.datetimepicker').datetimepicker({format: 'd.m.Y H:i', startDate: (!($(this).attr("value")==undefined))? $(this).attr("value"): ""})
  
