jijo-paulose / gwt-cal

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

Day numbers not correctly showed in month-view #178

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I execute this code and then add the calendar to a panel.

CalendarSettings cs = new CalendarSettings();
cs.setEnableDragDrop(false);
calendar = new Calendar(CalendarViews.MONTH, cs);
calendar.setWidth("100%");

2. If the month I show has no appointments, the day numbers are shown all 
together in the top. If I create a new appointment, add and reload the numbers 
are shown correctly after this even if I remove the appointment I created. It's 
just when loading and showing the calendar in a month with no appointments.

What is the expected output? What do you see instead?
Day numbers correctly showed in each day cell. They're all together in the top 
of the view.

What version of the product are you using? On what operating system?
gwt-cal 0.9.4, gwt 2.5.0.
Windows 7 x64, it happens with any explorer.

Please provide any additional information below.

Original issue reported on code.google.com by dico...@gmail.com on 4 May 2013 at 7:28

Attachments:

GoogleCodeExporter commented 8 years ago
Just out of curiosity do you get this issue if you set width to a fixed amount? 
Like setWidth("500px")? I typically put the calendar inside a LayoutPanel so 
that the OnResize event gets triggered and recalculates and redraws the 
Calendar.

Also do you see this issue in any other browsers, or just Internet Explorer?

Original comment by Brad.Ryd...@gmail.com on 4 May 2013 at 7:55

GoogleCodeExporter commented 8 years ago
I tried commenting the line of the setWidth and setWidth("500px") and didn't 
fix the problem yet.

In any browsers, yeah (I use Chrome as main). I checked:
- Chrome 26.0.1410.64 m
- Firefox 17.0.1
- IE10

It was the same for every explorer.

It's not very important for my objective because this case of an empty 
month-view will happen not very very often, but I discovered this long time ago 
and now I just got curious about.

Original comment by dico...@gmail.com on 4 May 2013 at 11:27

Attachments:

GoogleCodeExporter commented 8 years ago
Back here, I ended up today doing my own workaround thanks to a friend's idea. 
Let's say I have the list "result" with the appointments. So:

if (result.size() == 0){
    Appointment apDummy = new Appointment();
    apDummy.setStart(firstDayOfMonth); //calculated before
    apDummy.setEnd(lastDayOfMonth); //calculated before
    calendar.addAppointment(apDummy);
    calendar.removeAppointment(apDummy);
}else{
    //Load appointments
}

Maybe don't need to set the dates, but I wanted to be sure. It loads so fast 
the human eye can't see the dummy appointment before it dissapears. 

I know: weird, dirty and more adjectives I could say, but it does work for me.

Original comment by dico...@gmail.com on 22 Nov 2013 at 10:25