Re: [wicket-jquery-ui] How to modified RangeDatePickerTextField or DateRange Popup

Skip to first unread message


Aug 10, 2017, 11:53:05 AM8/10/17

1/ number of calendars:
You need to pass the appropriate option to the RangeDatePicker:

Options options = new Options("calendar", 2);

new RangeDatePickerTextField("datepicker", model, options);

2/ Future dates.
Future dates are not disabled, you can actually select them :)
The fact is that there are of another color (grey) to visually understand this is in the future. The best would to override the css to change the color, I don't think there is an option for this...

On Thu, Aug 10, 2017 at 9:26 AM, Dharmesh Ajudiya <> wrote:
I used wicket-jquery-ui-plugins-7.7.0 jar for RangeDatePickerTextField 

My project requirement are
- show only two month at a time (currently it shown 3 month at a time)
- enabled dates still Dec 2018 (currently is enabled for today and past all day  not for future)

Here is my code
    Model<String> rangeModel = Model.of("Any");
    Label rangeHead=new Label("range",rangeModel);

    long threeDays = Duration.ONE_DAY.getMilliseconds() * 3;
    long threeDaysAgo = new Date().getTime() - threeDays;
    final IModel<DateRange> model = Model.of(DateRange.of(new Date(), new Date(new Date().getTime() + Duration.ONE_DAY.getMilliseconds() * 365)));
    final RangeDatePickerTextField datePicker = new RangeDatePickerTextField("datepicker", model);
    add( new AjaxLink<Void>("update")
      private static final long serialVersionUID = 1L;
      public void onClick(AjaxRequestTarget target)
         DateRange range = datePicker.getModelObject();
         if(range != null)
           DateFormat df = new SimpleDateFormat("dd MMM");
           df.setTimeZone(DateUtils.UTC); //important
           rangeModel.setObject(String.format("%s - %s", df.format(range.getStart()), df.format(range.getEnd())));

I checked but didn't able to find anything 
Please help me on this 


Upcoming events:

2017 VRMA National Conference 15-18 October, Orlando, US
2017 SAS Middle East and Africa 12-13 November, Dubai, UAE  
2017 OPMA Fall Executive Summit 13-15 November, Orlando, US


You received this message because you are subscribed to the Google Groups "wicket-jquery-ui" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit

Reply all
Reply to author
0 new messages