MH42 / gwt-cal

Automatically exported from code.google.com/p/gwt-cal
0 stars 0 forks source link

In Month View: Appointments not showing up in the last cell of the month view #164

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Put calendar in month view
2. Add an appointment to the last cell of the month
   e.g Aug 4th when looking at the month of July 2012

Appointments added to all other cells display properly including Aug 3rd.

What is the expected output? What do you see instead?

The appointment should show on the last cell of the month (e.g. Aug 4th)

What version of the product are you using? On what operating system?
Cal Ver 0.9.3
Gwt 2.4
Firefox 10.0.6
Max OSX Lion

Please provide any additional information below.

MyPanel extends Composite. AbsolutePanel is the first widget 

public void MyPanel(){

    currentDate = new Date();

    calendar = new Calendar();
    calendar.setDate(currentDate);
    calendar.setView(CalendarViews.MONTH);      

    calendar.setWidth("100%px");
    calendar.setHeight("600px");

    mainPanel.add(calendar);
    mainPanel.setWidgetPosition(calendar, 0, 80);

}

@Override
protected void onLoad(){

    super.onLoad();

    Date date = new Date();  // July 29th 2012
    CalendarUtil.setToFirstDayOfMonth(date); July 1st 2012
    CalendarUtil.addDaysToDate(date, 34);  // Aug 4th 2012.

    Appointment appt = new Appointment();
    appt.setStart(date);
    appt.setEnd(date);
    appt.setTitle("Last cell in July");
    appt.setStyle(AppointmentStyle.RED);
    calendar.addAppointment(appt);

}

Original issue reported on code.google.com by virtualb...@gmail.com on 29 Jul 2012 at 5:55

GoogleCodeExporter commented 9 years ago
Changes in rev 427 should solve this problem.

When calculating the valid time-range for a month, the last day was not counted.

Original comment by ctasada on 14 Aug 2012 at 7:35

GoogleCodeExporter commented 9 years ago

Original comment by ctasada on 23 Jan 2013 at 11:20