brOOper / gwt-cal

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

AppointmentUtil. isMultiDay always return false #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In any case, this method always return false. 

What version of the product are you using? On what operating system?
0.8.2 

Please provide any additional information below.

===================================================================

---
src/main/java/com/bradrydzewski/gwt/calendar/client/util/AppointmentUtil.java
(revision 102)
+++
src/main/java/com/bradrydzewski/gwt/calendar/client/util/AppointmentUtil.java
(working copy)
@@ -47,7 +47,7 @@
         if(appt.getStart().getDate() == appt.getEnd().getDay()) {
             if(appt.getStart().getMonth() == appt.getEnd().getMonth()){
                 if(appt.getStart().getYear() == appt.getEnd().getYear()){
-                    return false;
+                    return true;
                 }
             }
         }

Original issue reported on code.google.com by fernando.rosado on 14 Sep 2009 at 3:05

GoogleCodeExporter commented 9 years ago
Hi,

There is another issue with isMultiday, the first "if" compare the result of
getDate() with the result of getDay (the former is day of month, the later is 
day of
week).
The patch in attachment also include the modification in CalendarView.java to 
call
setMultiDay() automatically 

I tested with gwt-cal-demo removing all the call likes 
"appt1.setMultiDay(true);" and
it seems ok.

Original comment by bertrand...@gmail.com on 19 Nov 2009 at 1:34

Attachments:

GoogleCodeExporter commented 9 years ago
Suggested fix implemented. Comparison logic is in the DateUtils.areOnTheSameDay 
class
to maintain date-based logic centralized as much as possible.

Original comment by carlos.m...@gmail.com on 13 Feb 2010 at 6:44

GoogleCodeExporter commented 9 years ago

Original comment by Brad.Ryd...@gmail.com on 12 May 2010 at 7:11