Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

How do you prevent DatePicker from resizeing?

$
0
0
Smart GWT version: 4.0p-20140217
Browser: IE 11, FireFox 26.0

I'm trying to get the DateChoser not to change its height when a month with 6 weeks (such as march 2014) is displayed. The following code displays two date chooser looking correctly. However if you change the DateChooser that starts in Feburary to march it resizes to be larger. If you change the DateChooser that starts in March to a different month it'll shrink.


Code:

public class DatePickerTest
{
        public static void displayDateChooser()
        {
                HLayout calendarLayout = new HLayout(10);
                calendarLayout.setWidth100();

                calendarLayout.setAlign(Alignment.CENTER);
                Date march = new Date(1393703165000l);
                Date feburary = new Date(1391283965000l);
                DateChooser startDateChooser = buildDateChooser(feburary);
                DateChooser endDateChooser = buildDateChooser(march);

                calendarLayout.addMember(startDateChooser);
                calendarLayout.addMember(endDateChooser);
               
                calendarLayout.draw();
        }
       
        private static DateChooser buildDateChooser(Date date)
        {
                DateChooser dateChooser = new DateChooser();
                dateChooser.setHeight(200);
                dateChooser.setData(date);
                return dateChooser;
        }
}


Viewing all articles
Browse latest Browse all 4756

Trending Articles