isackrubio / gwt-cal

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

Error when inserting MonthView into RootPanel or DockPanel #45

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.create a MonthView into rootPanel or DockPanel

What is the expected output? What do you see instead?
a view in the panel

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

Version: GWT - 2.0.3
Please provide any additional information below.
MonthView month=new MonthView();
RootPanel.get().add(month);
there is an error

Original issue reported on code.google.com by bienvenueqin@gmail.com on 14 Apr 2010 at 9:40

GoogleCodeExporter commented 9 years ago
dayView has the same question.

Original comment by bienvenueqin@gmail.com on 14 Apr 2010 at 9:53

GoogleCodeExporter commented 9 years ago
The MonthView is not actually a Widget and therefore cannot be added to a 
RootPanel 
or any other Panel.

You need to create a calendar, and then set the calendar's view:

Calendar calendar = new Calendar();
calendar.setDate(new Date()); 
calendar.setDays(3); 
calendar.setWidth("500px");
calendar.setHeight("400px");
calendar.setView(CalendarViews.MONTH);
add(calendar);

See http://code.google.com/p/gwt-cal/wiki/GettingStarted

Original comment by Brad.Ryd...@gmail.com on 14 Apr 2010 at 4:26

GoogleCodeExporter commented 9 years ago

Original comment by Brad.Ryd...@gmail.com on 14 Apr 2010 at 4:31