Buy me a coffee :)

Wicket - jQuery UI

jQuery UI integration in Wicket 6.x, Wicket 7.x , Wicket 8.x & Wicket 9.x

Ajax DatePicker

Components / Samples


AjaxDatePicker is close to DatePicker except that it performs an ajax post when the value changes.
You may override #onValueChanged() as follow:

form.add(new AjaxDatePicker("datepicker", model) {

	protected void onValueChanged(AjaxRequestTarget target)
		Date date = this.getModelObject();
		//TODO: do something with the date...


package com.googlecode.wicket.jquery.ui.samples.jqueryui.datepicker;

import java.util.Date;

import org.apache.wicket.core.request.handler.IPartialPageRequestHandler;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.Model;

import com.googlecode.wicket.jquery.ui.form.datepicker.AjaxDatePicker;
import com.googlecode.wicket.jquery.ui.panel.JQueryFeedbackPanel;

public class AjaxDatePickerPage extends AbstractDatePickerPage
	private static final long serialVersionUID = 1L;

	public AjaxDatePickerPage()

	private void initialize()
		final Form<Date> form = new Form<Date>("form");

		// FeedbackPanel //
		final FeedbackPanel feedback = new JQueryFeedbackPanel("feedback");

		// Date Picker //
		form.add(new AjaxDatePicker("datepicker", new Model<Date>()) {

			private static final long serialVersionUID = 1L;

			public void onValueChanged(IPartialPageRequestHandler handler)
				info("Selected date: " + this.getModelObject());
<!DOCTYPE html>
<html xmlns:wicket="">
	<title>Wicket jQuery UI: ajax date-picker</title>
	<div id="demo-panel">
		<form wicket:id="form">
			<input wicket:id="datepicker" type="text" /><br/>
			<div wicket:id="feedback" style="width: 360px;"></div>