Hi Isomorphic,
in attached testcase DateChooser does not value the min/max Year-values set via .setStartYear(int) and .setEndYear(int) (also the default values are not considered).
Could you please confirm?
Best regards,
Blama
PS: I'm on Smart GWT 3.0 eval., FF 9.0.1, Eclipse development mode
in attached testcase DateChooser does not value the min/max Year-values set via .setStartYear(int) and .setEndYear(int) (also the default values are not considered).
Code:
package com.smartgwt.sample.client; import java.util.Date; import com.smartgwt.client.util.SC; import com.smartgwt.client.widgets.DateChooser; import com.smartgwt.client.widgets.IButton; import com.smartgwt.client.widgets.events.ClickEvent; import com.smartgwt.client.widgets.events.ClickHandler; import com.smartgwt.client.widgets.events.DataChangedEvent; import com.smartgwt.client.widgets.events.DataChangedHandler; import com.google.gwt.core.client.EntryPoint; public class Testcase implements EntryPoint { boolean first = true; IButton btn; DateChooser dateChooser; int oldStart; int oldEnd; Date d; public void onModuleLoad() { d = new Date(); btn = new IButton("Show Picker"); dateChooser = new DateChooser() { { oldStart = getStartYear(); oldEnd = getEndYear(); setEndYear(2013); } }; btn.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { if (first) { SC.say("Old: " + oldStart + " - " + oldEnd + ", New: " + dateChooser.getStartYear() + " - " + dateChooser.getEndYear()); first = false; } dateChooser.setData(d); dateChooser.show(); // Try selecting years before 1995 and after 2013 } }); dateChooser.addDataChangedHandler(new DataChangedHandler() { @Override public void onDataChanged(DataChangedEvent event) { d = dateChooser.getData(); SC.say(d.toString()); dateChooser.hide(); dateChooser.destroy(); } }); btn.show(); } }
Best regards,
Blama
PS: I'm on Smart GWT 3.0 eval., FF 9.0.1, Eclipse development mode
Comment