i hava use FullCalendar in my application.i try to reload event into the calendar but it doesn`t work.here is my code
Expand|Select|Wrap|Line Numbers
- <%@ page import="java.util.HashMap;" %>
- <%@ page import="java.util.Map;" %>
- <%@ page import="com.google.gson.Gson;" %>
- <%
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("title", "event1");
- map.put("start","2009-11-11");
- // Convert to JSON string.
- String json = new Gson().toJson(map);
- // Write JSON string.
- response.setContentType("application/json");
- response.setCharacterEncoding("UTF-8");
- response.getWriter().write(json);
- %>
Expand|Select|Wrap|Line Numbers
- <script type="text/javascript">
- $().ready(function() {
- $('#appdate').datepicker();
- $('#calendar').fullCalendar({
- dayClick : function(dayDate){
- var dates = dayDate.getDate();
- var months = dayDate.getMonth()+1;
- var years = dayDate.getFullYear();
- var newdate = years + "-" + months + "-" + dates;
- document.location="../manageapp/slot.jsp?status=newslot&date="+newdate;
- },
- events: "TemuDia-1.0/manageapp/getapp.jsp"
- })
- });
- </script>