gwt - Disable of date in DatePicker doen't works -


I am trying to disable all dates in the GWT component, here my sample Code:

  datePicker.addShowRangeHandler (New ShowRangeHandler & lt; date & gt; {ShowRangeEvent  event} on public zero {System.out.println ("First date:" + event.getStart ()); System.out.println ("End date:" + event.getEnd ()); System.out.println ("Date date from date picker:" + datePicker. GetFirstDate ()); System.out.println ("Date Picker From Date:" + DatePicker.getLastDate ()); // Displayed by Calendar List Disable all dates; Date & date; DateTime = New URL and date; Date & gt; (); Date Current Date = event.getStart (); While (; currentDate.after (datePicker.getLastDate ())) { Date updateDate = CalendarUserData (current date); dateList.add (updateDate); CalendarUtil.addDaysToDate (current date, 1);} (Date of Date: dateList) {System.out.println ("Date Selected:" + Date ); System.out.println ("Date view capability:" + datePicker.isDateVisible (date)); }}});   

The date visibility is always false, it keeps telling me that not all dates are visible, but that should be true because it is between the first date and the last date, Also know a way to disable date in calendar ?, so if the date is not appearing on , then the date on piner for the date I get an exception will be found on the setTransientOnEnables () Tried.

I tried to apply my own DefaultClendarView but it requires a protected class which is not available by GWT.

I had similar problems, I was trying to disable dates in the future. I was finally found that the start and end dates are the final variables when I tried to change the start date, I found undefined behavior (in some cases my browser was completely free.). Its solution was to copy the start date and manipulate the copy instead of the start date. This has ended with me:

  datePicker.addShowRangeHandler (New ShowRangeHandler & lt; java.util.Date & gt; () {@ Override Public Wide On Showrange (Shorize Event & Gt; event) {date starts = event.getStart (date); date temporary = calendar usable date (start); date expiration = event.getend (date) date date = new date (while temp.before (end) ) {If (temp.after (today) & datePicker.isDateVisible (temp)} {datePicker.setTransientEnabledOnDates (incorrect, temporary);} CalendarUtil.addDaysToDate (temp, 1);}}});   

It should work in GWT 2.4. Earlier versions are not tested.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -