Class DatePicker
- java.lang.Object
-
- org.apache.wicket.behavior.Behavior
-
- org.apache.wicket.behavior.AbstractAjaxBehavior
-
- org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
-
- org.wicketstuff.jwicket.JQueryAjaxBehavior
-
- org.wicketstuff.jwicket.JQueryDurableAjaxBehavior
-
- org.wicketstuff.jwicket.ui.datepicker.DatePicker
-
- All Implemented Interfaces:
Serializable,org.apache.wicket.IComponentAwareEventSink,org.apache.wicket.IRequestListener,org.apache.wicket.markup.html.IComponentAwareHeaderContributor,org.apache.wicket.util.io.IClusterable,org.wicketstuff.jwicket.IStyleResolver
public class DatePicker extends org.wicketstuff.jwicket.JQueryDurableAjaxBehavior implements org.wicketstuff.jwicket.IStyleResolverYou can add an instance of this class to a WicketComponentto make it a resizableComponent. An instance of this class can be added to one and only oneComponent. AnotherComponentthat should have exactly the same behavior needs it's own instance.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classDatePicker.AjaxCallstatic classDatePicker.ShowAnimstatic classDatePicker.ShowDayThis Class controls the visibility of a single day rectangle in the DatePicker popup and the ability to select this day and an optional text popup for a single day.static classDatePicker.ShowOnTrigger
-
Field Summary
Fields Modifier and Type Field Description static org.wicketstuff.jwicket.JQueryResourceReferencedatePickerDefaultShowDayStateprotected org.wicketstuff.jwicket.JsMapoptionsstatic org.wicketstuff.jwicket.JQueryResourceReferenceuiDatepickerJsstatic org.wicketstuff.jwicket.JQueryResourceReferenceuiDatepickerJs_de
-
Constructor Summary
Constructors Constructor Description DatePicker()DatePicker(CharSequence icon)DatePicker(org.apache.wicket.request.resource.ResourceReference icon)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddShowDayState(DatePicker.ShowDay state)Add one more special treatment for a day.protected StringconfigureOnSelectGetOrPost()voiddisable(org.apache.wicket.ajax.AjaxRequestTarget target)Disable the datepickervoidenable(org.apache.wicket.ajax.AjaxRequestTarget target)Enable the datepickerorg.wicketstuff.jwicket.JQueryCssResourceReference[]getCssResources()protected StringgetJQueryObjectOfComponent(org.apache.wicket.Component component)protected org.wicketstuff.jwicket.JQueryAjaxBehavior.JsBuildergetJsBuilder()protected StringBuildergetJsShowDatesVariable()protected booleanhasToAddBeforeShowDayToOptions()protected voidonBeforeShow(org.apache.wicket.ajax.AjaxRequestTarget target)protected org.wicketstuff.jwicket.JQueryAjaxBehavior.JsFunctiononChangeMonthJsFunction()protected voidonChangeMonthYear(org.apache.wicket.ajax.AjaxRequestTarget target, String year, String month, org.wicketstuff.jwicket.SpecialKeys specialKeys)If you have setsetWantOnChangeMonthYearNotification(boolean)totruethis method is called after another moth or year is displayed, regardless of picking a date.protected voidonClose(org.apache.wicket.ajax.AjaxRequestTarget target, String pickedDate, org.wicketstuff.jwicket.SpecialKeys specialKeys)If you have setsetWantOnCloseNotification(boolean)totruethis method is called after the datepicker was closed, regardless of picking a date.protected voidonSelect(org.apache.wicket.ajax.AjaxRequestTarget target, String pickedDate, org.wicketstuff.jwicket.SpecialKeys specialKeys)If you have setsetWantOnSelectNotification(boolean)totruethis method is called after the user picked a date in the datepicker.protected voidonSelect(org.apache.wicket.ajax.AjaxRequestTarget target, Date pickedDate, org.wicketstuff.jwicket.SpecialKeys specialKeys)If you have setsetWantOnSelectNotification(boolean)totruethis method is called after the user picked a date in the datepicker.protected voidonSelect(org.apache.wicket.ajax.AjaxRequestTarget target, Date pickedDate, org.wicketstuff.jwicket.SpecialKeys specialKeys)If you have setsetWantOnSelectNotification(boolean)totruethis method is called after the user picked a date in the datepicker.voidrefresh(org.apache.wicket.ajax.AjaxRequestTarget target)voidrenderHead(org.apache.wicket.Component component, org.apache.wicket.markup.head.IHeaderResponse response)protected voidrespond(org.apache.wicket.ajax.AjaxRequestTarget target)Handles the event processing during resizing.DatePickersetAutoSize(boolean value)Sets the 'autoSize' property for this DatePicker.DatePickersetAutoSize(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)DatePickersetButtonImage(String value)Sets a button image that is displayed near theTextFieldfor the visual date representation.DatePickersetButtonImage(org.apache.wicket.ajax.AjaxRequestTarget target, String value)DatePickersetButtonImage(org.apache.wicket.ajax.AjaxRequestTarget target, org.apache.wicket.request.resource.ResourceReference value)DatePickersetButtonImage(org.apache.wicket.request.resource.ResourceReference value)Sets a button image that is displayed near theTextFieldfor the visual date representation.DatePickersetButtonImageOnly(boolean value)Sets the 'buttonImageOnly' property for this DatePicker.DatePickersetButtonImageOnly(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)DatePickersetButtonText(String value)Sets the 'buttonText' property for this DatePicker.DatePickersetButtonText(org.apache.wicket.ajax.AjaxRequestTarget target, String value)DatePickersetChangeMonth(boolean value)Sets the 'changeMonth' property for this DatePicker.DatePickersetChangeMonth(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)DatePickersetChangeYear(boolean value)Sets the 'changeYear' property for this DatePicker.DatePickersetChangeYear(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)DatePickersetCloseText(String value)Sets the 'closeText' property for this DatePicker.DatePickersetCloseText(org.apache.wicket.ajax.AjaxRequestTarget target, String value)DatePickersetConstraintInput(boolean value)Sets the 'constraintInput' property for this DatePicker.DatePickersetConstraintInput(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)voidsetCssClass(String cssClass)If you want en individual style for a DatePicker you may set this style with this method.DatePickersetCurrentText(String value)Sets the 'currentText' property for this DatePicker.DatePickersetCurrentText(org.apache.wicket.ajax.AjaxRequestTarget target, String value)DatePickersetDate(org.apache.wicket.ajax.AjaxRequestTarget target, Date date)DatePickersetDateFormat(String value)Sets the 'dateFormat' property for this DatePicker.DatePickersetDateFormat(org.apache.wicket.ajax.AjaxRequestTarget target, String value)DatePickersetDefaultDate(Date date)DatePickersetDuration(int value)DatePickersetDuration(String value)Sets the 'duration' property for this DatePicker.DatePickersetDuration(org.apache.wicket.ajax.AjaxRequestTarget target, int value)DatePickersetDuration(org.apache.wicket.ajax.AjaxRequestTarget target, String value)DatePickersetDuration(org.apache.wicket.ajax.AjaxRequestTarget target, org.wicketstuff.jwicket.JQuerySpeed value)DatePickersetDuration(org.wicketstuff.jwicket.JQuerySpeed value)Sets the 'duration' property for this DatePicker.DatePickersetMaxDate(String value)Sets the 'maxDate' property for this DatePicker.DatePickersetMaxDate(Date value)DatePickersetMaxDate(Date value)Sets the 'maxDate' property for this DatePicker.DatePickersetMaxDate(org.apache.wicket.ajax.AjaxRequestTarget target, String value)DatePickersetMaxDate(org.apache.wicket.ajax.AjaxRequestTarget target, Date value)DatePickersetMaxDate(org.apache.wicket.ajax.AjaxRequestTarget target, Date value)DatePickersetMinDate(String value)Sets the 'minDate' property for this DatePicker.DatePickersetMinDate(Date value)DatePickersetMinDate(Date value)Sets the 'minDate' property for this DatePicker.DatePickersetMinDate(org.apache.wicket.ajax.AjaxRequestTarget target, String value)DatePickersetMinDate(org.apache.wicket.ajax.AjaxRequestTarget target, Date value)DatePickersetMinDate(org.apache.wicket.ajax.AjaxRequestTarget target, Date value)DatePickersetMonthNamesShort(String[] monthNamesShort)Sets the 'monthNamesShort' property for this DatePicker.DatePickersetNumberOfMonths(int value)Sets the 'numberOfMonths' property for this DatePicker.DatePickersetNumberOfMonths(int rows, int columns)Sets the 'numberOfMonths' property for this DatePicker.DatePickersetNumberOfMonths(org.apache.wicket.ajax.AjaxRequestTarget target, int value)DatePickersetNumberOfMonths(org.apache.wicket.ajax.AjaxRequestTarget target, int rows, int columns)DatePickersetSelectOtherMonths(boolean value)Sets the 'selectOtherMonths' property for this DatePicker.DatePickersetSelectOtherMonths(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)DatePickersetShowAnim(org.apache.wicket.ajax.AjaxRequestTarget target, DatePicker.ShowAnim value)DatePickersetShowAnim(DatePicker.ShowAnim value)Sets the 'showAnim' property for this DatePicker.DatePickersetShowButtonPanel(boolean value)Sets the 'showButtonPanel' property for this DatePicker.DatePickersetShowButtonPanel(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)DatePickersetShowCurrentAtPos(int value)Sets the 'showCurrentAtPos' property for this DatePicker.DatePickersetShowCurrentAtPos(org.apache.wicket.ajax.AjaxRequestTarget target, int value)voidsetShowDayStates(Collection<DatePicker.ShowDay> states)Set the special treatments for multiple days at one.DatePickersetShowMonthAfterYear(boolean value)Sets the 'showMonthAfterYear' property for this DatePicker.DatePickersetShowMonthAfterYear(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)DatePickersetShowOn(org.apache.wicket.ajax.AjaxRequestTarget target, DatePicker.ShowOnTrigger value)DatePickersetShowOn(DatePicker.ShowOnTrigger value)Sets the 'showOn' property for this DatePicker.DatePickersetShowOtherMonths(boolean value)Sets the 'showOtherMonths' property for this DatePicker.DatePickersetShowOtherMonths(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)DatePickersetShowWeek(boolean value)Sets the 'showWeek' property for this DatePicker.DatePickersetShowWeek(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)DatePickersetStepMonths(int value)Sets the 'stepMonths' property for this DatePicker.DatePickersetStepMonths(org.apache.wicket.ajax.AjaxRequestTarget target, int value)DatePickersetWantOnBeforeShowNotificationWanted(boolean value)If set totrue, the callback-MethodonBeforeShow(org.apache.wicket.ajax.AjaxRequestTarget)is called before the DatePicker gets displayed.DatePickersetWantOnChangeMonthYearNotification(boolean value)If set totrue, the callback-MethodonChangeMonthYear(AjaxRequestTarget, String, String, SpecialKeys)is called when a date was picked.DatePickersetWantOnCloseNotification(boolean value)If set totrue, the callback-MethodonClose(AjaxRequestTarget, String, SpecialKeys)is called when a date was picked.DatePickersetWantOnSelectNotification(boolean value)If set totrue, the callback-MethodonSelect(AjaxRequestTarget, String, SpecialKeys)is called when a date was picked.DatePickersetYearRange(String value)The range of years displayed in the year drop-down: either relative to today's year ("-nn:+nn"), relative to the currently selected year ("c-nn:c+nn"), absolute ("nnnn:nnnn"), or combinations of these formats ("nnnn:-nn").protected voidupdateAjaxAttributes(org.apache.wicket.ajax.attributes.AjaxRequestAttributes attributes)-
Methods inherited from class org.wicketstuff.jwicket.JQueryDurableAjaxBehavior
isAlreadyRendered, setRestoreAfterRedraw, updateBehavior
-
Methods inherited from class org.wicketstuff.jwicket.JQueryAjaxBehavior
addCssResources, addUserProvidedResourceReferences, addUserProvidedResourceReferences, getUserProvidedResourceReferences, printParameters, printParameters, setRawOptions
-
Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
findIndicatorId, getAttributes, getCallbackFunction, getCallbackFunctionBody, getCallbackScript, getCallbackScript, onBind, onRequest, postprocessConfiguration, renderAjaxAttributes, renderAjaxAttributes
-
Methods inherited from class org.apache.wicket.behavior.AbstractAjaxBehavior
afterRender, bind, getCallbackUrl, getComponent, onComponentRendered, onComponentTag, onComponentTag, onUnbind, unbind
-
Methods inherited from class org.apache.wicket.behavior.Behavior
beforeRender, canCallListener, detach, getStatelessHint, isEnabled, isTemporary, onAttribute, onConfigure, onEvent, onException, onRemove, onTag
-
-
-
-
Field Detail
-
uiDatepickerJs
public static final org.wicketstuff.jwicket.JQueryResourceReference uiDatepickerJs
-
uiDatepickerJs_de
public static final org.wicketstuff.jwicket.JQueryResourceReference uiDatepickerJs_de
-
datePickerDefaultShowDayState
public static final org.wicketstuff.jwicket.JQueryResourceReference datePickerDefaultShowDayState
-
options
protected org.wicketstuff.jwicket.JsMap options
-
-
Constructor Detail
-
DatePicker
public DatePicker()
-
DatePicker
public DatePicker(org.apache.wicket.request.resource.ResourceReference icon)
-
DatePicker
public DatePicker(CharSequence icon)
-
-
Method Detail
-
respond
protected void respond(org.apache.wicket.ajax.AjaxRequestTarget target)
Handles the event processing during resizing.- Overrides:
respondin classorg.wicketstuff.jwicket.JQueryAjaxBehavior
-
setButtonImageOnly
public DatePicker setButtonImageOnly(boolean value)
Sets the 'buttonImageOnly' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
value-trueorfalse.- Returns:
- this object
-
setButtonImageOnly
public DatePicker setButtonImageOnly(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
-
setAutoSize
public DatePicker setAutoSize(boolean value)
Sets the 'autoSize' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
value-trueorfalse.- Returns:
- this object
-
setAutoSize
public DatePicker setAutoSize(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
-
setButtonText
public DatePicker setButtonText(String value)
Sets the 'buttonText' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
value- The new buttonText ornullto remove this option.- Returns:
- this object
-
setButtonText
public DatePicker setButtonText(org.apache.wicket.ajax.AjaxRequestTarget target, String value)
-
setButtonImage
public DatePicker setButtonImage(String value)
Sets a button image that is displayed near theTextFieldfor the visual date representation.
-
setButtonImage
public DatePicker setButtonImage(org.apache.wicket.ajax.AjaxRequestTarget target, String value)
-
setButtonImage
public DatePicker setButtonImage(org.apache.wicket.request.resource.ResourceReference value)
Sets a button image that is displayed near theTextFieldfor the visual date representation.
-
setButtonImage
public DatePicker setButtonImage(org.apache.wicket.ajax.AjaxRequestTarget target, org.apache.wicket.request.resource.ResourceReference value)
-
setChangeMonth
public DatePicker setChangeMonth(boolean value)
Sets the 'changeMonth' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
value-trueorfalse.- Returns:
- this object
-
setChangeMonth
public DatePicker setChangeMonth(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
-
setChangeYear
public DatePicker setChangeYear(boolean value)
Sets the 'changeYear' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
value-trueorfalse.- Returns:
- this object
-
setChangeYear
public DatePicker setChangeYear(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
-
setCloseText
public DatePicker setCloseText(String value)
Sets the 'closeText' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
value-trueorfalse.- Returns:
- this object
-
setCloseText
public DatePicker setCloseText(org.apache.wicket.ajax.AjaxRequestTarget target, String value)
-
setConstraintInput
public DatePicker setConstraintInput(boolean value)
Sets the 'constraintInput' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
value-trueorfalse.- Returns:
- this object
-
setConstraintInput
public DatePicker setConstraintInput(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
-
setCurrentText
public DatePicker setCurrentText(String value)
Sets the 'currentText' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
value- Text to be dsiplayes on button- Returns:
- this object
-
setCurrentText
public DatePicker setCurrentText(org.apache.wicket.ajax.AjaxRequestTarget target, String value)
-
setDateFormat
public DatePicker setDateFormat(String value)
Sets the 'dateFormat' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
value- the date format- Returns:
- this object
-
setDateFormat
public DatePicker setDateFormat(org.apache.wicket.ajax.AjaxRequestTarget target, String value)
-
setDate
public DatePicker setDate(org.apache.wicket.ajax.AjaxRequestTarget target, Date date)
-
setDefaultDate
public DatePicker setDefaultDate(Date date)
-
setDuration
public DatePicker setDuration(String value)
Sets the 'duration' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
value- duration in ms- Returns:
- this object
-
setDuration
public DatePicker setDuration(org.apache.wicket.ajax.AjaxRequestTarget target, String value)
-
setDuration
public DatePicker setDuration(int value)
-
setDuration
public DatePicker setDuration(org.apache.wicket.ajax.AjaxRequestTarget target, int value)
-
setDuration
public DatePicker setDuration(org.wicketstuff.jwicket.JQuerySpeed value)
Sets the 'duration' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
value- duration- Returns:
- this object
-
setDuration
public DatePicker setDuration(org.apache.wicket.ajax.AjaxRequestTarget target, org.wicketstuff.jwicket.JQuerySpeed value)
-
setYearRange
public DatePicker setYearRange(String value)
The range of years displayed in the year drop-down: either relative to today's year ("-nn:+nn"), relative to the currently selected year ("c-nn:c+nn"), absolute ("nnnn:nnnn"), or combinations of these formats ("nnnn:-nn"). Note that this option only affects what appears in the drop-down, to restrict which dates may be selected use the minDate and/or maxDate options.
-
setMaxDate
public DatePicker setMaxDate(String value)
Sets the 'maxDate' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
value- max date as String- Returns:
- this object
-
setMaxDate
public DatePicker setMaxDate(org.apache.wicket.ajax.AjaxRequestTarget target, String value)
-
setMaxDate
public DatePicker setMaxDate(Date value)
Sets the 'maxDate' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
value- max date as String- Returns:
- this object
-
setMaxDate
public DatePicker setMaxDate(org.apache.wicket.ajax.AjaxRequestTarget target, Date value)
-
setMaxDate
public DatePicker setMaxDate(Date value)
-
setMaxDate
public DatePicker setMaxDate(org.apache.wicket.ajax.AjaxRequestTarget target, Date value)
-
setMinDate
public DatePicker setMinDate(String value)
Sets the 'minDate' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
value- min date as String- Returns:
- this object
-
setMinDate
public DatePicker setMinDate(org.apache.wicket.ajax.AjaxRequestTarget target, String value)
-
setMinDate
public DatePicker setMinDate(Date value)
Sets the 'minDate' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
value- min date as String- Returns:
- this object
-
setMinDate
public DatePicker setMinDate(org.apache.wicket.ajax.AjaxRequestTarget target, Date value)
-
setMinDate
public DatePicker setMinDate(Date value)
-
setMinDate
public DatePicker setMinDate(org.apache.wicket.ajax.AjaxRequestTarget target, Date value)
-
setNumberOfMonths
public DatePicker setNumberOfMonths(int value)
Sets the 'numberOfMonths' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
value- the number of months to show at one- Returns:
- this object
-
setNumberOfMonths
public DatePicker setNumberOfMonths(org.apache.wicket.ajax.AjaxRequestTarget target, int value)
-
setNumberOfMonths
public DatePicker setNumberOfMonths(int rows, int columns)
Sets the 'numberOfMonths' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.
-
setNumberOfMonths
public DatePicker setNumberOfMonths(org.apache.wicket.ajax.AjaxRequestTarget target, int rows, int columns)
-
setSelectOtherMonths
public DatePicker setSelectOtherMonths(boolean value)
Sets the 'selectOtherMonths' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
value-trueorfalse.- Returns:
- this object
-
setSelectOtherMonths
public DatePicker setSelectOtherMonths(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
-
setShowAnim
public DatePicker setShowAnim(DatePicker.ShowAnim value)
Sets the 'showAnim' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
value-trueorfalse.- Returns:
- this object
-
setShowAnim
public DatePicker setShowAnim(org.apache.wicket.ajax.AjaxRequestTarget target, DatePicker.ShowAnim value)
-
setShowButtonPanel
public DatePicker setShowButtonPanel(boolean value)
Sets the 'showButtonPanel' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
value-trueorfalse.- Returns:
- this object
-
setShowButtonPanel
public DatePicker setShowButtonPanel(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
-
setShowCurrentAtPos
public DatePicker setShowCurrentAtPos(int value)
Sets the 'showCurrentAtPos' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
value-trueorfalse.- Returns:
- this object
-
setShowCurrentAtPos
public DatePicker setShowCurrentAtPos(org.apache.wicket.ajax.AjaxRequestTarget target, int value)
-
setShowMonthAfterYear
public DatePicker setShowMonthAfterYear(boolean value)
Sets the 'showMonthAfterYear' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
value-trueorfalse.- Returns:
- this object
-
setShowMonthAfterYear
public DatePicker setShowMonthAfterYear(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
-
getJQueryObjectOfComponent
protected String getJQueryObjectOfComponent(org.apache.wicket.Component component)
-
setShowOn
public DatePicker setShowOn(DatePicker.ShowOnTrigger value)
Sets the 'showOn' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
value-trueorfalse.- Returns:
- this object
-
setShowOn
public DatePicker setShowOn(org.apache.wicket.ajax.AjaxRequestTarget target, DatePicker.ShowOnTrigger value)
-
setShowOtherMonths
public DatePicker setShowOtherMonths(boolean value)
Sets the 'showOtherMonths' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
value-trueorfalse.- Returns:
- this object
-
setShowOtherMonths
public DatePicker setShowOtherMonths(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
-
setShowWeek
public DatePicker setShowWeek(boolean value)
Sets the 'showWeek' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
value-trueorfalse.- Returns:
- this object
-
setShowWeek
public DatePicker setShowWeek(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
-
setStepMonths
public DatePicker setStepMonths(int value)
Sets the 'stepMonths' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
value- how many months to move in one step- Returns:
- this object
-
setStepMonths
public DatePicker setStepMonths(org.apache.wicket.ajax.AjaxRequestTarget target, int value)
-
setMonthNamesShort
public DatePicker setMonthNamesShort(String[] monthNamesShort)
Sets the 'monthNamesShort' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.- Parameters:
monthNamesShort- The list of abbreviated month names, as used in the month header on each datepicker and as requested via the dateFormat option. Ex. new String[]{ "Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"}- Returns:
- this object
-
setCssClass
public void setCssClass(String cssClass)
If you want en individual style for a DatePicker you may set this style with this method. The DatePicker the gets sourrounded with a <div class="...">. Normally a DatePicker element looks like<div id="ui-datepicker-div" class="ui-datepicker ui-widget ui-widget-content ....>...</div>
If you set a cssClass the DatePicket looks like<div class="cssClass"><div id="ui-datepicker-div" class="ui-datepicker ui-widget ui-widget-content ....>...</div></div>
- Parameters:
cssClass- your custom css class
-
setWantOnSelectNotification
public DatePicker setWantOnSelectNotification(boolean value)
If set totrue, the callback-MethodonSelect(AjaxRequestTarget, String, SpecialKeys)is called when a date was picked. See the jquery-ui documentation for more information- Parameters:
value-trueorfalse.- Returns:
- this object
-
setWantOnCloseNotification
public DatePicker setWantOnCloseNotification(boolean value)
If set totrue, the callback-MethodonClose(AjaxRequestTarget, String, SpecialKeys)is called when a date was picked. See the jquery-ui documentation for more information- Parameters:
value-trueorfalse.- Returns:
- this object
-
setWantOnChangeMonthYearNotification
public DatePicker setWantOnChangeMonthYearNotification(boolean value)
If set totrue, the callback-MethodonChangeMonthYear(AjaxRequestTarget, String, String, SpecialKeys)is called when a date was picked. See the jquery-ui documentation for more information- Parameters:
value-trueorfalse.- Returns:
- this object
-
setWantOnBeforeShowNotificationWanted
public DatePicker setWantOnBeforeShowNotificationWanted(boolean value)
If set totrue, the callback-MethodonBeforeShow(org.apache.wicket.ajax.AjaxRequestTarget)is called before the DatePicker gets displayed. See the jquery-ui documentation for detailed information- Returns:
- this object
-
updateAjaxAttributes
protected void updateAjaxAttributes(org.apache.wicket.ajax.attributes.AjaxRequestAttributes attributes)
- Overrides:
updateAjaxAttributesin classorg.apache.wicket.ajax.AbstractDefaultAjaxBehavior
-
getJsBuilder
protected org.wicketstuff.jwicket.JQueryAjaxBehavior.JsBuilder getJsBuilder()
- Specified by:
getJsBuilderin classorg.wicketstuff.jwicket.JQueryDurableAjaxBehavior
-
onChangeMonthJsFunction
protected org.wicketstuff.jwicket.JQueryAjaxBehavior.JsFunction onChangeMonthJsFunction()
-
configureOnSelectGetOrPost
protected String configureOnSelectGetOrPost()
-
hasToAddBeforeShowDayToOptions
protected boolean hasToAddBeforeShowDayToOptions()
-
onBeforeShow
protected void onBeforeShow(org.apache.wicket.ajax.AjaxRequestTarget target)
-
onSelect
protected void onSelect(org.apache.wicket.ajax.AjaxRequestTarget target, String pickedDate, org.wicketstuff.jwicket.SpecialKeys specialKeys)If you have setsetWantOnSelectNotification(boolean)totruethis method is called after the user picked a date in the datepicker.- Parameters:
target- the AjaxRequestTarget of the resize operation.pickedDate- The selected date asStringspecialKeys- the special keys that were pressed when the event occurs
-
onSelect
protected void onSelect(org.apache.wicket.ajax.AjaxRequestTarget target, Date pickedDate, org.wicketstuff.jwicket.SpecialKeys specialKeys)If you have setsetWantOnSelectNotification(boolean)totruethis method is called after the user picked a date in the datepicker. This method is called afterwas called only if the picked date can be parsed into a Java Date object.- Parameters:
target- the AjaxRequestTarget of the resize operation.pickedDate- The selected date asDatespecialKeys- the special keys that were pressed when the event occurs
-
onSelect
protected void onSelect(org.apache.wicket.ajax.AjaxRequestTarget target, Date pickedDate, org.wicketstuff.jwicket.SpecialKeys specialKeys)If you have setsetWantOnSelectNotification(boolean)totruethis method is called after the user picked a date in the datepicker. This method is called afterwas called only if the picked date can be parsed into a Java Date object.- Parameters:
target- the AjaxRequestTarget of the resize operation.pickedDate- The selected date asDatespecialKeys- the special keys that were pressed when the event occurs
-
onClose
protected void onClose(org.apache.wicket.ajax.AjaxRequestTarget target, String pickedDate, org.wicketstuff.jwicket.SpecialKeys specialKeys)If you have setsetWantOnCloseNotification(boolean)totruethis method is called after the datepicker was closed, regardless of picking a date.- Parameters:
target- the AjaxRequestTarget of the resize operation.specialKeys- the special keys that were pressed when the event occurs
-
onChangeMonthYear
protected void onChangeMonthYear(org.apache.wicket.ajax.AjaxRequestTarget target, String year, String month, org.wicketstuff.jwicket.SpecialKeys specialKeys)If you have setsetWantOnChangeMonthYearNotification(boolean)totruethis method is called after another moth or year is displayed, regardless of picking a date.- Parameters:
target- the AjaxRequestTarget of the resize operation.specialKeys- the special keys that were pressed when the event occurs
-
addShowDayState
public void addShowDayState(DatePicker.ShowDay state)
Add one more special treatment for a day. If you don't provide aDatePicker.ShowDayobject for a day it is selectable by default. Use this method if you want a special treatment (selectable, CSS class oder tooltip text) for a day. You may call this method as often as you like. The state is added to the existing list of states. Do not provide different states for one day. The resulting behavior is not defined.- Parameters:
state- as specific treatment for one day.
-
setShowDayStates
public void setShowDayStates(Collection<DatePicker.ShowDay> states)
Set the special treatments for multiple days at one. This removes all former definitons and replaces them with the newstates.- Parameters:
states- ACollectionof states.
-
renderHead
public void renderHead(org.apache.wicket.Component component, org.apache.wicket.markup.head.IHeaderResponse response)- Specified by:
renderHeadin interfaceorg.apache.wicket.markup.html.IComponentAwareHeaderContributor- Overrides:
renderHeadin classorg.wicketstuff.jwicket.JQueryDurableAjaxBehavior
-
getJsShowDatesVariable
protected StringBuilder getJsShowDatesVariable()
-
disable
public void disable(org.apache.wicket.ajax.AjaxRequestTarget target)
Disable the datepicker- Parameters:
target- An AjaxRequestTarget
-
refresh
public void refresh(org.apache.wicket.ajax.AjaxRequestTarget target)
-
enable
public void enable(org.apache.wicket.ajax.AjaxRequestTarget target)
Enable the datepicker- Parameters:
target- An AjaxRequestTarget
-
getCssResources
public org.wicketstuff.jwicket.JQueryCssResourceReference[] getCssResources()
- Specified by:
getCssResourcesin interfaceorg.wicketstuff.jwicket.IStyleResolver
-
-