isackrubio / gwt-cal

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

Invalid number of rows rendered in Month view #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a new Calendar and sets its view to month via 
#setView(CalendarViews.MONTH)
2. Set the date
3. You can see this in the live version @ 
http://google.latest.gwt-web-calendar.appspot.com/ 
and click on the 'Month' tab

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

expect months that should have 5 rows have 6
actual http://screencast.com/t/MTE2YTUwY 

expect months that should have 6 rows have 5
actual http://screencast.com/t/ZmMzYTI4YmQ

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

http://gwt-cal.googlecode.com/svn/branches/version-0.9/gwt-cal  osx snow leopard

Please provide any additional information below.

This actually works in correctly in hosted mode but I see the erroneous 
behavior in all native 
browsers. You can see this in the demos in the month view here.  Its a minor 
annoyance for the 
months that should have 5 rows but have 6, but for the months that should have 
6 but have 5 
rows there is now way to access the end of the month because the last row is 
not rendered.

The bug should but somewhere in 

com.bradrydzewski.gwt.calendar.client.monthview.MonthViewHelper#monthViewRequire
dRows(D
ate firstOfTheMonth)

as far as I can tell that is the method responsible for determining the number 
or rows returned.

Original issue reported on code.google.com by d.tang...@gmail.com on 5 Feb 2010 at 6:12

GoogleCodeExporter commented 9 years ago
Carlos, i'm forwarding this one to you, if you don't mind taking a look

Original comment by Brad.Ryd...@gmail.com on 5 Feb 2010 at 6:20

GoogleCodeExporter commented 9 years ago
A quick reference check showed both gwt datepicker 
(http://screencast.com/t/OGQzNGUzYj) and gxt datepicker 
(http://screencast.com/t/ZWM5ZGQ3) both render 6 row regardless. The real 
google calendar renders 5 when 
needed but the date picker it uses actually always renders 6 rows as well.  If 
it is easier it might be safe to just 
always render 6 rows

Original comment by d.tang...@gmail.com on 5 Feb 2010 at 6:28

GoogleCodeExporter commented 9 years ago
Hey Brad, 

I don't mind at all. I'll look into this today.

Original comment by carlos.m...@gmail.com on 5 Feb 2010 at 6:52

GoogleCodeExporter commented 9 years ago
A Bug fix has been checked-in. Apparently the problem was that we were 
calculating
the number of required rows for the first date shown in the calendar instead of 
a
date ON the actual month of interest displayed in the Month View. This was not 
caused
by the MonthViewHelper#monthViewRequiredRows logic but by the date it was 
passed for
the calculation.

Because for some months the first date shown fell within the same month, the 
code
would correctly display the number of rows. For month views showing days from 
the
previous month, it was the number of rows for the PREVIOUS month what was being
displayed and hence the problem.

Snapshots from Firefox Hosted, Firefox Native, Chrome Native (all in Ubuntu 
x64) and
Internet Explorer 7 (Windows Vista 32-bit) are attached for the months shown 
with the
error when the issue was logged (Feb 2010 & May 2010).

CM

Original comment by carlos.m...@gmail.com on 7 Feb 2010 at 9:47

Attachments:

GoogleCodeExporter commented 9 years ago
awesome. thanks Carlos!

Original comment by d.tang...@gmail.com on 7 Feb 2010 at 10:06

GoogleCodeExporter commented 9 years ago
Hello d.tangren,

Thank you for your feedback. If you can please let me know whether you find the 
issue
solved in your own environment so I can properly change the status of the 
defect I
would really appreciate it. Thanks for reporting the issue.

Best,

CM

Original comment by carlos.m...@gmail.com on 8 Feb 2010 at 1:04

GoogleCodeExporter commented 9 years ago
P.S. I am jealous I don't have a osx snow leopard to test myself. ;)

Original comment by carlos.m...@gmail.com on 8 Feb 2010 at 1:06

GoogleCodeExporter commented 9 years ago
Just tested. Works great! Thanks Carlos.

Original comment by d.tang...@gmail.com on 8 Feb 2010 at 2:22

GoogleCodeExporter commented 9 years ago

Original comment by carlos.m...@gmail.com on 8 Feb 2010 at 7:33