HtmlPanelGrid panelgrid = new HtmlPanelGrid();
panelgrid.setColumns(1);
panelgrid.setBorder(0);
form.getChildren().add(panelgrid);
UIOutputPanel panel = new UIOutputPanel();
panel.setId("panel");
panelgrid.getChildren().add(panel);
UICalendar calendar = (UICalendar) facesContext.getApplication().createComponent(facesContext, "org.richfaces.component.UICalendar", "org.richfaces.renderkit.html.CalendarRenderer");
//UICalendar calendar = new UICalendar();
calendar.setValueExpression("value", expressionFactory.createValueExpression(elContext, "#{componentBindingCtrl.testDate}", Date.class));
calendar.setEnableManualInput(true);
calendar.setRequired(false);
calendar.setId("cal");
calendar.setTimeZone(TimeZone.getDefault());
calendar.setLocale(Locale.getDefault());
panel.getChildren().add(calendar);
}