I have the following questions related to calendar widget.
1. Exception while adding a RecordList in a calendar.
Record record = new Record();
record.setAttribute("startDate", start);
record.setAttribute("endDate", end);
record.setAttribute("name", m_desc);
record.setAttribute("description", m_address);
record.setAttribute("canEdit", true);
record.setAttribute("eventWindowStyle", m_stylevalue);
rl.add(record);
m_calendar.setData(rl);
it throws an error when trying to delete an existing event. Please review the attached file.
2. Exception while adding a Map in a calendar addEvent method.
The issue is related to the calendar.addEvent (java.util.Date startDate, java.util.Date endDate, java.lang.String name, java.lang.String description, java.util.Map otherFields).
I have created one map and put in the calendar.addEvent and then it throws a ClassCastException.
Map map = New Hashmap()
map.put(“Type”,”name”);
calendar.addEvent(StartDate,EndDate,name,description,map);
This will throw the java.lang.ClassCastException.
3.Can not remove an existing event
When trying to edit the existing event, it is not getting deleted and it will add new event along with the existing event.
CalendarEvent ev = new CalendarEvent();
ev.setDescription("description");
ev.setName(”Name”);
ev.setStartDate(startDate);
ev.setEndDate(endDate);
m_calendar.addEvent(ev.getStartDate(), ev.getEndDate(), ”Name” ,"description");
m_calendar.removeEvent(ev);
1. Exception while adding a RecordList in a calendar.
Record record = new Record();
record.setAttribute("startDate", start);
record.setAttribute("endDate", end);
record.setAttribute("name", m_desc);
record.setAttribute("description", m_address);
record.setAttribute("canEdit", true);
record.setAttribute("eventWindowStyle", m_stylevalue);
rl.add(record);
m_calendar.setData(rl);
it throws an error when trying to delete an existing event. Please review the attached file.
2. Exception while adding a Map in a calendar addEvent method.
The issue is related to the calendar.addEvent (java.util.Date startDate, java.util.Date endDate, java.lang.String name, java.lang.String description, java.util.Map otherFields).
I have created one map and put in the calendar.addEvent and then it throws a ClassCastException.
Map map = New Hashmap()
map.put(“Type”,”name”);
calendar.addEvent(StartDate,EndDate,name,description,map);
This will throw the java.lang.ClassCastException.
3.Can not remove an existing event
When trying to edit the existing event, it is not getting deleted and it will add new event along with the existing event.
CalendarEvent ev = new CalendarEvent();
ev.setDescription("description");
ev.setName(”Name”);
ev.setStartDate(startDate);
ev.setEndDate(endDate);
m_calendar.addEvent(ev.getStartDate(), ev.getEndDate(), ”Name” ,"description");
m_calendar.removeEvent(ev);
Comment