Monday, August 30, 2010

Re: Set the month in the datepicker

Can anyone of you guys assist me on this.

Thanks
Siva

On Aug 30, 12:42 pm, Pinzine <emailtomu...@gmail.com> wrote:
> Hi,
>
> I have 2 dates FromDate and ToDate. I used the datebox to show the
> dates. My requirement is when the user selects the some dates in the
> fromdate, I need to show the same month in the Todate's datepicker.
>
> I have used the following , but it shows the date in the todate's
> datebox. I just want to navigate to the month in the todate's
> datepicker ( with respect to fromdate) and it should not come in the
> datebox.
>
> txtFromDate.addValueChangeHandler(new ValueChangeHandler<Date>() {
>                         int pog = 0;
>                         public void onValueChange(ValueChangeEvent<Date> event) {
>                                 if (pog%2==0){
>
> txtToDate.getDatePicker().setValue(txtFromDate.getValue(),true);
>
>                                 }
>                                 pog++;
>                         }
>                 });
>
>                 toDate.getDatePicker().setValue(fromDate.getValue(),true);
>
> Please advice.
>
> Thanks
> Siva.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment