private DateTimePicker() { super(null, Locale.getDefault()); getMonthView().setSelectionModel(new SingleDaySelectionModel()); }
public DateTimePicker(Date d, Locale l, DateFormat dateFormat, DateFormat timeFormat) { super(d, l); if (!dateFormat.getTimeZone().equals(timeFormat.getTimeZone())) { throw new IllegalStateException(String.format("Time zone mismatch: dateFormat is [%s] but timeFormat is [%s]", dateFormat, timeFormat)); } timeZone = timeFormat.getTimeZone(); getMonthView().setSelectionModel(new SingleDaySelectionModel()); getMonthView().setTimeZone(timeZone); setLinkPanel(createTimePanel()); setFormats(dateFormat); setTimeFormat(timeFormat); setDateTime(d); }