Subversion Repository Public Repository

litesoft

Diff Revisions 49 vs 105 for /trunk/Java/GWT/Client/src/org/litesoft/GWT/forms/client/components/impls/input/FormDatePicker.java

Diff revisions: vs.
  @@ -3,6 +3,7 @@
3 3
4 4 import java.util.*;
5 5
6 + import org.litesoft.GWT.client.widgets.*;
6 7 import org.litesoft.GWT.forms.client.components.nonpublic.*;
7 8 import org.litesoft.core.simpletypes.temporal.*;
8 9 import org.litesoft.core.simpletypes.temporal.nonpublic.*;
  @@ -77,16 +78,17 @@
77 78 private static class MyPicker extends ExtendableDatePicker
78 79 {
79 80 private Date mExitValue = null;
81 + private Button mTodayButton;
80 82
81 83 public MyPicker( String pCancelText, String pTodayText )
82 84 {
83 - addDialogButtonPanel( pCancelText, pTodayText, null );
85 + addDialogButtonPanel( new RedButton( pCancelText ), mTodayButton = new RegButton( pTodayText) );
84 86 }
85 87
86 88 @Override
87 - protected void dialogButtonPanelClicked( int pButtonIndex )
89 + protected void dialogButtonClicked( Button pButton )
88 90 {
89 - if ( pButtonIndex != 0 ) // 'Today' button
91 + if ( mTodayButton == pButton )
90 92 {
91 93 mExitValue = new Date();
92 94 }