public class InlineDatePicker<T> extends org.apache.wicket.markup.html.WebMarkupContainer implements IWiQueryPlugin
An inline DatePicker as described in here.
| Constructor and Description |
|---|
InlineDatePicker(String id)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
contribute(WiQueryResourceManager wiQueryResourceManager)
Declares resources (JavaScript and CSS files) to import.
|
JsStatement |
destroy()
Method to destroy the datepicker
This will return the element back to its pre-init state.
|
void |
destroy(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to destroy the datepicker within the ajax request
|
protected void |
detachModel() |
JsStatement |
disable()
Method to disable the datepicker
|
void |
disable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to disable the datepicker within the ajax request
|
JsStatement |
enable()
Method to enable the datepicker
|
void |
enable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to enable the datepicker within the ajax request
|
String |
getAltField() |
String |
getAltFormat() |
String |
getAppendText() |
String |
getButtonImage() |
String |
getButtonText() |
String |
getCloseText() |
String |
getCurrentText() |
JsStatement |
getDate()
Method returning the current date for the datepicker
|
String |
getDateFormat()
Returns the ISO date format to use.
|
ArrayOfDayNames |
getDayNames() |
ArrayOfDayNames |
getDayNamesMin() |
ArrayOfDayNames |
getDayNamesShort() |
DateOption |
getDefaultDate() |
DatePickerDuration |
getDuration() |
short |
getFirstDay()
Returns the calendar's starting day.
|
DateOption |
getMaxDate() |
DateOption |
getMinDate() |
ArrayOfMonthNames |
getMonthNames() |
ArrayOfMonthNames |
getMonthNamesShort() |
String |
getNextText() |
DatePickerNumberOfMonths |
getNumberOfMonths()
Returns the number of months displayed on the date picker.
|
protected Options |
getOptions()
Method retrieving the options of the component
|
String |
getPrevText() |
DatePickerShortYearCutOff |
getShortYearCutoff()
Returns the shortYearCutoff option value.
|
String |
getShowAnim() |
short |
getShowCurrentAtPos() |
DatePicker.ShowOnEnum |
getShowOn() |
ListItemOptions<LiteralOption> |
getShowOptions() |
boolean |
getShowOtherMonths()
Deprecated.
will be removed in 1.2
Returns if the next/previous months are showed in the calendar.
|
short |
getStepMonths()
Returns the number of months stepped when the next/previous button are
hit.
|
String |
getWeekHeader() |
DatePickerYearRange |
getYearRange() |
String |
getYearSuffix() |
JsStatement |
hide()
Method to hide the datepicker
|
void |
hide(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to hide the datepicker within the ajax request
|
void |
hide(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget,
short speed)
Method to hide the datepicker within the ajax request
|
JsStatement |
hide(short speed)
Method to hide the datepicker
|
boolean |
isAutoSize() |
boolean |
isButtonImageOnly() |
boolean |
isChangeMonth()
Returns true if the date's month is selectable in a drop down list,
returns false otherwise.
|
boolean |
isChangeYear()
Returns true if the date's year is selectable in a drop down list,
returns false otherwise.
|
boolean |
isConstrainInput() |
boolean |
isDisabled() |
boolean |
isGotoCurrent() |
boolean |
isHideIfNoPrevNext() |
boolean |
isIsRTL() |
boolean |
isNavigationAsDateFormat() |
boolean |
isSelectOtherMonths() |
boolean |
isShowButtonPanel() |
boolean |
isShowMonthAfterYear() |
boolean |
isShowOtherMonths()
Returns if the next/previous months are showed in the calendar.
|
boolean |
isShowWeek() |
InlineDatePicker<T> |
setAltField(String altField)
The jQuery selector for another field that is to be updated with the
selected date from the datepicker.
|
InlineDatePicker<T> |
setAltFormat(String altFormat)
The dateFormat to be used for the altField option.
|
InlineDatePicker<T> |
setAppendText(String appendText)
Set's the text to display after each date field, e.g.
|
InlineDatePicker<T> |
setAutoSize(boolean autoSize)
Set to true to automatically resize the input field to accomodate dates
in the current dateFormat.
|
InlineDatePicker<T> |
setBeforeShowDayEvent(JsScopeUiDatePickerEvent beforeShowDay)
The function takes a date as a parameter and must return an array with [0]
equal to true/false indicating whether or not this date is selectable, [1]
equal to a CSS class name(s) or '' for the default presentation and [2]
an optional popup tooltip for this date.
|
InlineDatePicker<T> |
setBeforeShowEvent(JsScopeUiEvent beforeShow)
Set's the callback before the datepicker is displayed.
|
InlineDatePicker<T> |
setButtonImage(String buttonImage)
Set's URL for the popup button image.
|
InlineDatePicker<T> |
setButtonImageOnly(boolean buttonImageOnly)
Set to true to place an image after the field to use as the trigger
without it appearing on a button.
|
InlineDatePicker<T> |
setButtonText(String buttonText)
Set's the text to display on the trigger button.
|
InlineDatePicker<T> |
setCalculateWeek(JsScope calculateWeek)
A function to calculate the week of the year for a given date.
|
InlineDatePicker<T> |
setChangeMonth(boolean changeMonth)
Sets if the date's month is selectable in a drop down list or not.
|
InlineDatePicker<T> |
setChangeYear(boolean changeYear)
Sets if the date's year is selectable in a drop down list or not.
|
InlineDatePicker<T> |
setCloseText(String closeText)
Set's the text to display for the close link.
|
InlineDatePicker<T> |
setConstrainInput(boolean constrainInput)
True if the input field is constrained to the current date format.
|
InlineDatePicker<T> |
setCurrentText(String currentText)
Set's the text to display for the current day link.
|
void |
setDate(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget,
DateOption dateOption)
Method to set the date of the datepicker within the ajax request
|
JsStatement |
setDate(DateOption dateOption)
Method to set the date of the datepicker
|
InlineDatePicker<T> |
setDateFormat(String dateFormat)
Sets the ISO date format to use.
|
InlineDatePicker<T> |
setDayNames(ArrayOfDayNames dayNames)
Set's the list of long day names, starting from Sunday, for use as
requested via the dateFormat setting.
|
InlineDatePicker<T> |
setDayNamesMin(ArrayOfDayNames dayNamesMin)
Set's the list of minimised day names, starting from Sunday, for use as
column headers within the datepicker.
|
InlineDatePicker<T> |
setDayNamesShort(ArrayOfDayNames dayNamesShort)
Set's the list of abbreviated day names, starting from Sunday, for use as
requested via the dateFormat setting.
|
InlineDatePicker<T> |
setDefaultDate(DateOption defaultDate)
Set the date to highlight on first opening if the field is blank.
|
InlineDatePicker<T> |
setDisabled(boolean disabled)
Disables (true) or enables (false) the datepicker.
|
InlineDatePicker<T> |
setDuration(DatePickerDuration duration)
Control the speed at which the datepicker appears, it may be a time in
milliseconds, a string representing one of the three predefined speeds
("slow", "normal", "fast"), or '' for immediately.
|
InlineDatePicker<T> |
setFirstDay(short firstDay)
Sets the calendar's starting day.
|
InlineDatePicker<T> |
setGotoCurrent(boolean gotoCurrent)
If true, the current day link moves to the currently selected date instead of today.
|
InlineDatePicker<T> |
setHideIfNoPrevNext(boolean hideIfNoPrevNext)
Normally the previous and next links are disabled when not applicable
(see minDate/maxDate).
|
InlineDatePicker<T> |
setIsRTL(boolean isRTL)
True if the current language is drawn from right to left.
|
InlineDatePicker<T> |
setMaxDate(DateOption maxDate)
Set a maximum selectable date via a Date object, or a number of days from
today (e.g.
|
InlineDatePicker<T> |
setMinDate(DateOption minDate)
Set a minimum selectable date via a Date object, or a number of days from
today (e.g.
|
InlineDatePicker<T> |
setMonthNames(ArrayOfMonthNames monthNames)
Set's the list of full month names, as used in the month header on each
datepicker and as requested via the dateFormat setting.
|
InlineDatePicker<T> |
setMonthNamesShort(ArrayOfMonthNames monthNamesShort)
Set's the list of abbreviated month names, for use as requested via the
dateFormat setting.
|
InlineDatePicker<T> |
setNavigationAsDateFormat(boolean navigationAsDateFormat)
When true the formatDate function is applied to the prevText, nextText,
and currentText values before display, allowing them to display the
target month names for example.
|
InlineDatePicker<T> |
setNextText(String nextText)
Set's the text to display for the next month link.
|
InlineDatePicker<T> |
setNumberOfMonths(DatePickerNumberOfMonths numberOfMonths)
Sets the number of months displayed on the date picker.
|
InlineDatePicker<T> |
setOnChangeMonthYearEvent(JsScopeUiDatePickerOnChangeEvent onChangeMonthYear)
Allows you to define your own event when the datepicker moves to a new
month and/or year.
|
InlineDatePicker<T> |
setOnCloseEvent(JsScopeUiDatePickerDateTextEvent onClose)
Allows you to define your own event when the datepicker is closed, whether
or not a date is selected.
|
InlineDatePicker<T> |
setOnSelectEvent(JsScopeUiDatePickerDateTextEvent onSelect)
Allows you to define your own event when the datepicker is selected.
|
InlineDatePicker<T> |
setPrevText(String prevText)
Set's the text to display for the previous month link.
|
InlineDatePicker<T> |
setSelectOtherMonths(boolean selectOtherMonths)
When true days in other months shown before or after the current month
are selectable.
|
InlineDatePicker<T> |
setShortYearCutoff(DatePickerShortYearCutOff shortYearCutoff)
Set the cutoff year for determining the century for a date
|
InlineDatePicker<T> |
setShowAnim(String showAnim)
Set the name of the animation used to show/hide the datepicker.
|
InlineDatePicker<T> |
setShowButtonPanel(boolean showButtonPanel)
Whether to show the button panel.
|
InlineDatePicker<T> |
setShowCurrentAtPos(short showCurrentAtPos)
Specify where in a multi-month display the current month shows, starting
from 0 at the top/left.
|
InlineDatePicker<T> |
setShowMonthAfterYear(boolean showMonthAfterYear)
Whether to show the month after the year in the header.
|
InlineDatePicker<T> |
setShowOn(DatePicker.ShowOnEnum showOn)
Have the datepicker appear automatically when the field receives focus
('focus'), appear only when a button is clicked ('button'), or appear
when either event takes place ('both').
|
InlineDatePicker<T> |
setShowOptions(ListItemOptions<LiteralOption> showOptions)
If using one of the jQuery UI effects for showAnim, you can provide
additional settings for that animation via this option.
|
InlineDatePicker<T> |
setShowOtherMonths(boolean showOtherMonths)
Sets if the next/previous months are showed in the calendar.
|
InlineDatePicker<T> |
setShowWeek(boolean showWeek)
When true a column is added to show the week of the year.
|
InlineDatePicker<T> |
setStepMonths(short stepMonths)
Sets the number of months stepped when the next/previous button are hit.
|
InlineDatePicker<T> |
setWeekHeader(String weekHeader)
The text to display for the week of the year column heading.
|
InlineDatePicker<T> |
setYearRange(DatePickerYearRange yearRange)
Sets the selectable year range.
|
InlineDatePicker<T> |
setYearSuffix(String yearSuffix)
Additional text to display after the year in the month headers.
|
JsStatement |
show()
Method to show the datepicker
|
void |
show(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to show the datepicker within the ajax request
|
JsStatement |
statement()
Returns the main
JsStatement used to create the plugin. |
getMarkupType, getWebPage, getWebRequestadd, addOrReplace, autoAdd, autoAdd, contains, findMarkupStream, get, get, getAssociatedMarkupStream, getMarkupStream, hasAssociatedMarkup, internalAdd, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onAfterRenderChildren, onComponentTagBody, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, renderNext, replace, setDefaultModel, setMarkupStream, size, swap, toString, toString, visitChildren, visitChildrenadd, addStateChange, afterRender, beforeRender, callOnBeforeRenderIfNotVisible, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachBehaviors, detachModels, determineVisibility, error, exceptionMessage, fatal, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviors, getBehaviors, getBehaviorsRawList, getClassRelativePath, getComponentBorder, getConverter, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessage, getFlag, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdImpl, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalAttach, internalDetach, internalOnAttach, internalOnDetach, internalOnModelChanged, isActionAuthorized, isAncestorOf, isAttached, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, locateMarkupStream, markAttached, markRendering, modelChanged, modelChanging, onAfterRender, onAttach, onBeforeRender, onBeginRequest, onComponentTag, onConfigure, onDetach, onEndRequest, onInitialize, onModelChanged, onModelChanging, onRemove, prepareForRender, prepareForRender, redirectToInterceptPage, remove, remove, render, render, renderComponent, renderComponent, renderComponentTag, rendered, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, setAuto, setComponentBorder, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setFlag, setIgnoreAttributeModifier, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setRedirect, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, urlFor, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, warn, wrappublic InlineDatePicker(String id)
id - Markup identifiantprotected void detachModel()
detachModel in class org.apache.wicket.Componentpublic void contribute(WiQueryResourceManager wiQueryResourceManager)
IWiQueryPlugincontribute in interface IWiQueryPluginwiQueryResourceManager - The WiQueryResourceManager instance managing this
component resources.public JsStatement statement()
IWiQueryPluginJsStatement used to create the plugin.statement in interface IWiQueryPluginJsStatement corresponding to this component.protected Options getOptions()
public InlineDatePicker<T> setAltField(String altField)
altField - public String getAltField()
public InlineDatePicker<T> setAltFormat(String altFormat)
altFormat - public String getAltFormat()
public InlineDatePicker<T> setAppendText(String appendText)
appendText - public String getAppendText()
public InlineDatePicker<T> setAutoSize(boolean autoSize)
public boolean isAutoSize()
public InlineDatePicker<T> setButtonImage(String buttonImage)
buttonImage - public String getButtonImage()
public InlineDatePicker<T> setButtonImageOnly(boolean buttonImageOnly)
buttonImageOnly - public boolean isButtonImageOnly()
public InlineDatePicker<T> setButtonText(String buttonText)
buttonText - public String getButtonText()
public InlineDatePicker<T> setCalculateWeek(JsScope calculateWeek)
calculateWeek - public InlineDatePicker<T> setChangeMonth(boolean changeMonth)
public boolean isChangeMonth()
public InlineDatePicker<T> setWeekHeader(String weekHeader)
weekHeader - public String getWeekHeader()
public InlineDatePicker<T> setYearRange(DatePickerYearRange yearRange)
yearRange - public DatePickerYearRange getYearRange()
public InlineDatePicker<T> setYearSuffix(String yearSuffix)
yearSuffix - public String getYearSuffix()
public InlineDatePicker<T> setChangeYear(boolean changeYear)
public boolean isChangeYear()
public InlineDatePicker<T> setCloseText(String closeText)
closeText - public String getCloseText()
public InlineDatePicker<T> setConstrainInput(boolean constrainInput)
constrainInput - public boolean isConstrainInput()
public InlineDatePicker<T> setCurrentText(String currentText)
currentText - public String getCurrentText()
public InlineDatePicker<T> setFirstDay(short firstDay)
firstDay - public short getFirstDay()
public InlineDatePicker<T> setGotoCurrent(boolean gotoCurrent)
gotoCurrent - public boolean isGotoCurrent()
public InlineDatePicker<T> setHideIfNoPrevNext(boolean hideIfNoPrevNext)
hideIfNoPrevNext - public boolean isHideIfNoPrevNext()
public InlineDatePicker<T> setIsRTL(boolean isRTL)
isRTL - public boolean isIsRTL()
public InlineDatePicker<T> setMaxDate(DateOption maxDate)
maxDate - public DateOption getMaxDate()
public InlineDatePicker<T> setMinDate(DateOption minDate)
minDate - public DateOption getMinDate()
public InlineDatePicker<T> setMonthNames(ArrayOfMonthNames monthNames)
monthNames - public ArrayOfMonthNames getMonthNames()
public InlineDatePicker<T> setMonthNamesShort(ArrayOfMonthNames monthNamesShort)
monthNamesShort - public ArrayOfMonthNames getMonthNamesShort()
public InlineDatePicker<T> setNavigationAsDateFormat(boolean navigationAsDateFormat)
navigationAsDateFormat - public boolean isNavigationAsDateFormat()
public InlineDatePicker<T> setNextText(String nextText)
nextText - public String getNextText()
public InlineDatePicker<T> setShowOtherMonths(boolean showOtherMonths)
public boolean getShowOtherMonths()
public boolean isShowOtherMonths()
public InlineDatePicker<T> setNumberOfMonths(DatePickerNumberOfMonths numberOfMonths)
public DatePickerNumberOfMonths getNumberOfMonths()
public InlineDatePicker<T> setPrevText(String prevText)
prevText - public String getPrevText()
public InlineDatePicker<T> setSelectOtherMonths(boolean selectOtherMonths)
selectOtherMonths - public boolean isSelectOtherMonths()
public InlineDatePicker<T> setShortYearCutoff(DatePickerShortYearCutOff shortYearCutoff)
shortYearCutoff - public DatePickerShortYearCutOff getShortYearCutoff()
public InlineDatePicker<T> setShowAnim(String showAnim)
showAnim - public String getShowAnim()
public InlineDatePicker<T> setShowButtonPanel(boolean showButtonPanel)
showButtonPanel - public boolean isShowButtonPanel()
public InlineDatePicker<T> setShowCurrentAtPos(short showCurrentAtPos)
showCurrentAtPos - public short getShowCurrentAtPos()
public InlineDatePicker<T> setShowMonthAfterYear(boolean showMonthAfterYear)
showMonthAfterYear - public boolean isShowMonthAfterYear()
public InlineDatePicker<T> setShowOn(DatePicker.ShowOnEnum showOn)
showOn - public DatePicker.ShowOnEnum getShowOn()
public InlineDatePicker<T> setShowOptions(ListItemOptions<LiteralOption> showOptions)
showOptions - public ListItemOptions<LiteralOption> getShowOptions()
public InlineDatePicker<T> setShowWeek(boolean showWeek)
public boolean isShowWeek()
public InlineDatePicker<T> setStepMonths(short stepMonths)
public short getStepMonths()
public InlineDatePicker<T> setDateFormat(String dateFormat)
public String getDateFormat()
public InlineDatePicker<T> setDayNames(ArrayOfDayNames dayNames)
dayNames - public ArrayOfDayNames getDayNames()
public InlineDatePicker<T> setDayNamesMin(ArrayOfDayNames dayNamesMin)
dayNamesMin - public ArrayOfDayNames getDayNamesMin()
public InlineDatePicker<T> setDayNamesShort(ArrayOfDayNames dayNamesShort)
dayNamesShort - public ArrayOfDayNames getDayNamesShort()
public InlineDatePicker<T> setDefaultDate(DateOption defaultDate)
defaultDate - public DateOption getDefaultDate()
public InlineDatePicker<T> setDisabled(boolean disabled)
disabled - public boolean isDisabled()
public InlineDatePicker<T> setDuration(DatePickerDuration duration)
duration - public DatePickerDuration getDuration()
public InlineDatePicker<T> setBeforeShowEvent(JsScopeUiEvent beforeShow)
beforeShow - public InlineDatePicker<T> setBeforeShowDayEvent(JsScopeUiDatePickerEvent beforeShowDay)
beforeShowDay - public InlineDatePicker<T> setOnChangeMonthYearEvent(JsScopeUiDatePickerOnChangeEvent onChangeMonthYear)
onChangeMonthYear - public InlineDatePicker<T> setOnCloseEvent(JsScopeUiDatePickerDateTextEvent onClose)
onClose - public InlineDatePicker<T> setOnSelectEvent(JsScopeUiDatePickerDateTextEvent onSelect)
onSelect - public JsStatement destroy()
public void destroy(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget - public JsStatement disable()
public void disable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget - public JsStatement enable()
public void enable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget - public JsStatement getDate()
public JsStatement hide(short speed)
speed - The speed at which to close the date picker.public void hide(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget,
short speed)
ajaxRequestTarget - speed - The speed at which to close the date picker.public JsStatement hide()
public void hide(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget - public JsStatement setDate(DateOption dateOption)
dateOption - Date to setpublic void setDate(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget,
DateOption dateOption)
ajaxRequestTarget - dateOption - Date to setpublic JsStatement show()
public void show(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
ajaxRequestTarget - Copyright © 2009-2012. All Rights Reserved.