PDA

View Full Version : DatePicker in DateField not showing up



ssinai
17 Feb 2012, 1:36 PM
I'm having a hell of a time getting the DateField's DatePicker to show up in a Dialog. When I click on the DatePicker icon to the right of the text field, I only get the top part of the DatePicker that let's you select the month, but the calendar below it doesn't show up.

I've tried it inside dialogs, outside dialogs, with different panels and layout containers - and nothing seems to work.

I'm using GWT 2.4, GXT 2.2.5 and Java 7, and I've tried it with Firefox and Chrome.

Below is some very stripped down code. I'm probably missing something really stupid, but I can't figure it out. Any suggestions?

Thanks,
Steve Sinai


import com.extjs.gxt.ui.client.widget.Dialog;
import com.extjs.gxt.ui.client.widget.form.DateField;
import com.extjs.gxt.ui.client.widget.form.FormPanel;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Element;

public class SchedulerDialog extends Dialog {

public SchedulerDialog () {
setModal(true);
setButtons(Dialog.OKCANCEL);
setSize(400, 400);
}

protected void onRender (Element element, int index) {

super.onRender(element, index);
setHideOnButtonClick(true);

FormPanel formPanel = new FormPanel();
formPanel.setHeading("Schedule Report");

DateField dateField = new DateField();
dateField.setFieldLabel("Once On");
formPanel.add(dateField);

add(formPanel);
}
}

ssinai
17 Feb 2012, 3:04 PM
I'm noticing that the DatePicker is coming back null.

ssinai
17 Feb 2012, 3:08 PM
Disregard. The problem is our css file.