org.odlabs.wiquery.ui.datepicker
Class InlineDatePicker<T>

java.lang.Object
  extended by org.apache.wicket.Component
      extended by org.apache.wicket.MarkupContainer
          extended by org.apache.wicket.markup.html.WebMarkupContainer
              extended by org.odlabs.wiquery.ui.datepicker.InlineDatePicker<T>
All Implemented Interfaces:
Serializable, Iterable<org.apache.wicket.Component>, org.apache.wicket.event.IEventSink, org.apache.wicket.event.IEventSource, org.apache.wicket.IClusterable, org.apache.wicket.IConverterLocator, org.apache.wicket.markup.html.IHeaderContributor, org.apache.wicket.request.component.IRequestableComponent, org.apache.wicket.util.IHierarchical<org.apache.wicket.Component>, IWiQueryPlugin

public class InlineDatePicker<T>
extends org.apache.wicket.markup.html.WebMarkupContainer
implements IWiQueryPlugin

$Id$

An inline DatePicker as described in here.

Since:
1.0.2
Author:
Lionel Armanet, Ernesto Reinaldo Barreiro
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.wicket.Component
ENABLE, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER
 
Constructor Summary
InlineDatePicker(String id)
          Constructor
 
Method Summary
 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()
           
 void renderHead(org.apache.wicket.markup.html.IHeaderResponse response)
           
 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.
 
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer
getWebPage, getWebRequest
 
Methods inherited from class org.apache.wicket.MarkupContainer
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, hasAssociatedMarkup, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onComponentTagBody, onMarkupAttached, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildren
 
Methods inherited from class org.apache.wicket.Component
add, addStateChange, afterRender, beforeRender, canCallListenerInterface, canCallListenerInterface, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessage, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalPrepareForRender, internalRenderComponent, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, locateMarkupStream, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onBeforeRender, onComponentTag, onConfigure, onDetach, onEvent, onInitialize, onModelChanged, onModelChanging, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, warn, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InlineDatePicker

public InlineDatePicker(String id)
Constructor

Parameters:
id - Markup identifiant
Method Detail

detachModel

protected void detachModel()
Overrides:
detachModel in class org.apache.wicket.Component

renderHead

public void renderHead(org.apache.wicket.markup.html.IHeaderResponse response)
Specified by:
renderHead in interface org.apache.wicket.markup.html.IHeaderContributor
Overrides:
renderHead in class org.apache.wicket.Component

statement

public JsStatement statement()
Description copied from interface: IWiQueryPlugin
Returns the main JsStatement used to create the plugin.

Specified by:
statement in interface IWiQueryPlugin
Returns:
The JsStatement corresponding to this component.

getOptions

protected Options getOptions()
Method retrieving the options of the component

Returns:
the options

setAltField

public InlineDatePicker<T> setAltField(String altField)
The jQuery selector for another field that is to be updated with the selected date from the datepicker. Use the altFormat setting below to change the format of the date within this field. Leave as blank for no alternate field.

Parameters:
altField -
Returns:
instance of the current component

getAltField

public String getAltField()
Returns:
the altField option value

setAltFormat

public InlineDatePicker<T> setAltFormat(String altFormat)
The dateFormat to be used for the altField option. This allows one date format to be shown to the user for selection purposes, while a different format is actually sent behind the scenes. The format can be combinations of the following:

Parameters:
altFormat -
Returns:
instance of the current component

getAltFormat

public String getAltFormat()
Returns:
the altFormat option value

setAppendText

public InlineDatePicker<T> setAppendText(String appendText)
Set's the text to display after each date field, e.g. to show the required format.

Parameters:
appendText -
Returns:
instance of the current component

getAppendText

public String getAppendText()
Returns:
the appendText option value

setAutoSize

public InlineDatePicker<T> setAutoSize(boolean autoSize)
Set to true to automatically resize the input field to accomodate dates in the current dateFormat.

Returns:
instance of the current component

isAutoSize

public boolean isAutoSize()
Returns:
the autoSize option

setButtonImage

public InlineDatePicker<T> setButtonImage(String buttonImage)
Set's URL for the popup button image. If set, button text becomes the alt value and is not directly displayed.

Parameters:
buttonImage -
Returns:
instance of the current component

getButtonImage

public String getButtonImage()
Returns:
the buttonImage option value

setButtonImageOnly

public 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.

Parameters:
buttonImageOnly -
Returns:
instance of the current component

isButtonImageOnly

public boolean isButtonImageOnly()
Returns:
the buttonImageOnly option value

setButtonText

public InlineDatePicker<T> setButtonText(String buttonText)
Set's the text to display on the trigger button. Use in conjunction with showOn equal to 'button' or 'both'.

Parameters:
buttonText -
Returns:
instance of the current component

getButtonText

public String getButtonText()
Returns:
the buttonText option value

setCalculateWeek

public InlineDatePicker<T> setCalculateWeek(JsScope calculateWeek)
A function to calculate the week of the year for a given date. The default implementation uses the ISO 8601 definition: weeks start on a Monday; the first week of the year contains the first Thursday of the year. Default: $.datepicker.iso8601Week

Parameters:
calculateWeek -
Returns:
instance of the current component

setChangeMonth

public InlineDatePicker<T> setChangeMonth(boolean changeMonth)
Sets if the date's month is selectable in a drop down list or not.

Returns:
instance of the current component

isChangeMonth

public boolean isChangeMonth()
Returns true if the date's month is selectable in a drop down list, returns false otherwise.


setWeekHeader

public InlineDatePicker<T> setWeekHeader(String weekHeader)
The text to display for the week of the year column heading. This attribute is one of the regionalisation attributes. Use showWeek to display this column.

Parameters:
weekHeader -
Returns:
instance of the current component

getWeekHeader

public String getWeekHeader()
Returns:
the weekHeader option value

setYearRange

public InlineDatePicker<T> setYearRange(DatePickerYearRange yearRange)
Sets the selectable year range. This range can either be defined by a start year and an end year (like 2001 to 2010), or it can be defined relatively to the today's date (like current-10 to current+10).

Parameters:
yearRange -
Returns:
instance of the current component

getYearRange

public DatePickerYearRange getYearRange()
Returns:
the year range valu option

setYearSuffix

public InlineDatePicker<T> setYearSuffix(String yearSuffix)
Additional text to display after the year in the month headers. This attribute is one of the regionalisation attributes.

Parameters:
yearSuffix -
Returns:
instance of the current component

getYearSuffix

public String getYearSuffix()
Returns:
the yearSuffix option value

setChangeYear

public InlineDatePicker<T> setChangeYear(boolean changeYear)
Sets if the date's year is selectable in a drop down list or not.

Returns:
instance of the current component

isChangeYear

public boolean isChangeYear()
Returns true if the date's year is selectable in a drop down list, returns false otherwise.


setCloseText

public InlineDatePicker<T> setCloseText(String closeText)
Set's the text to display for the close link. This attribute is one of the regionalisation attributes. Use the showButtonPanel to display this button.

Parameters:
closeText -
Returns:
instance of the current component

getCloseText

public String getCloseText()
Returns:
the closeText option value

setConstrainInput

public InlineDatePicker<T> setConstrainInput(boolean constrainInput)
True if the input field is constrained to the current date format.

Parameters:
constrainInput -
Returns:
instance of the current component

isConstrainInput

public boolean isConstrainInput()
Returns:
the buttonImageOnly option value

setCurrentText

public InlineDatePicker<T> setCurrentText(String currentText)
Set's the text to display for the current day link. This attribute is one of the regionalisation attributes. Use the showButtonPanel to display this button.

Parameters:
currentText -
Returns:
instance of the current component

getCurrentText

public String getCurrentText()
Returns:
the currentText option value

setFirstDay

public InlineDatePicker<T> setFirstDay(short firstDay)
Sets the calendar's starting day. 0 is for sunday, 1 for monday ...

Parameters:
firstDay -
Returns:
instance of the current component

getFirstDay

public short getFirstDay()
Returns the calendar's starting day.


setGotoCurrent

public InlineDatePicker<T> setGotoCurrent(boolean gotoCurrent)
If true, the current day link moves to the currently selected date instead of today.

Parameters:
gotoCurrent -
Returns:
instance of the current component

isGotoCurrent

public boolean isGotoCurrent()
Returns:
the gotoCurrent option value

setHideIfNoPrevNext

public InlineDatePicker<T> setHideIfNoPrevNext(boolean hideIfNoPrevNext)
Normally the previous and next links are disabled when not applicable (see minDate/maxDate). You can hide them altogether by setting this attribute to true.

Parameters:
hideIfNoPrevNext -
Returns:
instance of the current component

isHideIfNoPrevNext

public boolean isHideIfNoPrevNext()
Returns:
the hideIfNoPrevNext option value

setIsRTL

public InlineDatePicker<T> setIsRTL(boolean isRTL)
True if the current language is drawn from right to left. This attribute is one of the regionalisation attributes.

Parameters:
isRTL -
Returns:
instance of the current component

isIsRTL

public boolean isIsRTL()
Returns:
the isRTL option value

setMaxDate

public InlineDatePicker<T> setMaxDate(DateOption maxDate)
Set a maximum selectable date via a Date object, or a number of days from today (e.g. +7) or a string of values and periods ('y' for years, 'm' for months, 'w' for weeks, 'd' for days, e.g. '+1m +1w'), or null for no limit.

Parameters:
maxDate -
Returns:
instance of the current component

getMaxDate

public DateOption getMaxDate()
Returns:
the maxDate option value

setMinDate

public InlineDatePicker<T> setMinDate(DateOption minDate)
Set a minimum selectable date via a Date object, or a number of days from today (e.g. +7) or a string of values and periods ('y' for years, 'm' for months, 'w' for weeks, 'd' for days, e.g. '+1m +1w'), or null for no limit.

Parameters:
minDate -
Returns:
instance of the current component

getMinDate

public DateOption getMinDate()
Returns:
the minDate option value

setMonthNames

public 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. This attribute is one of the regionalisation attributes.

Parameters:
monthNames -
Returns:
instance of the current component

getMonthNames

public ArrayOfMonthNames getMonthNames()
Returns:
the monthNames option value

setMonthNamesShort

public InlineDatePicker<T> setMonthNamesShort(ArrayOfMonthNames monthNamesShort)
Set's the list of abbreviated month names, for use as requested via the dateFormat setting. This attribute is one of the regionalisation attributes.

Parameters:
monthNamesShort -
Returns:
instance of the current component

getMonthNamesShort

public ArrayOfMonthNames getMonthNamesShort()
Returns:
the monthNames option value

setNavigationAsDateFormat

public 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.

Parameters:
navigationAsDateFormat -
Returns:
instance of the current component

isNavigationAsDateFormat

public boolean isNavigationAsDateFormat()
Returns:
the navigationAsDateFormat option value

setNextText

public InlineDatePicker<T> setNextText(String nextText)
Set's the text to display for the next month link. This attribute is one of the regionalisation attributes. With the standard ThemeRoller styling, this value is replaced by an icon.

Parameters:
nextText -
Returns:
instance of the current component

getNextText

public String getNextText()
Returns:
the nextText option value

setShowOtherMonths

public InlineDatePicker<T> setShowOtherMonths(boolean showOtherMonths)
Sets if the next/previous months are showed in the calendar.

Returns:
instance of the current component

getShowOtherMonths

@Deprecated
public boolean getShowOtherMonths()
Deprecated. will be removed in 1.2 Returns if the next/previous months are showed in the calendar.


isShowOtherMonths

public boolean isShowOtherMonths()
Returns if the next/previous months are showed in the calendar.


setNumberOfMonths

public InlineDatePicker<T> setNumberOfMonths(DatePickerNumberOfMonths numberOfMonths)
Sets the number of months displayed on the date picker.

Returns:
instance of the current component

getNumberOfMonths

public DatePickerNumberOfMonths getNumberOfMonths()
Returns the number of months displayed on the date picker.


setPrevText

public InlineDatePicker<T> setPrevText(String prevText)
Set's the text to display for the previous month link. This attribute is one of the regionalisation attributes. With the standard ThemeRoller styling, this value is replaced by an icon.

Parameters:
prevText -
Returns:
instance of the current component

getPrevText

public String getPrevText()
Returns:
the prevText option value

setSelectOtherMonths

public InlineDatePicker<T> setSelectOtherMonths(boolean selectOtherMonths)
When true days in other months shown before or after the current month are selectable. This only applies if showOtherMonths is also true.

Parameters:
selectOtherMonths -
Returns:
instance of the current behavior

isSelectOtherMonths

public boolean isSelectOtherMonths()
Returns:
the selectOtherMonths option

setShortYearCutoff

public InlineDatePicker<T> setShortYearCutoff(DatePickerShortYearCutOff shortYearCutoff)
Set the cutoff year for determining the century for a date

Parameters:
shortYearCutoff -
Returns:
instance of the current component

getShortYearCutoff

public DatePickerShortYearCutOff getShortYearCutoff()
Returns the shortYearCutoff option value.


setShowAnim

public InlineDatePicker<T> setShowAnim(String showAnim)
Set the name of the animation used to show/hide the datepicker. Use 'show' (the default), 'slideDown', 'fadeIn', or any of the show/hide jQuery UI effects

Parameters:
showAnim -
Returns:
instance of the current component

getShowAnim

public String getShowAnim()
Returns:
the showAnim option value

setShowButtonPanel

public InlineDatePicker<T> setShowButtonPanel(boolean showButtonPanel)
Whether to show the button panel.

Parameters:
showButtonPanel -
Returns:
instance of the current component

isShowButtonPanel

public boolean isShowButtonPanel()
Returns:
the showButtonPanel option value

setShowCurrentAtPos

public InlineDatePicker<T> setShowCurrentAtPos(short showCurrentAtPos)
Specify where in a multi-month display the current month shows, starting from 0 at the top/left.

Parameters:
showCurrentAtPos -
Returns:
instance of the current component

getShowCurrentAtPos

public short getShowCurrentAtPos()
Returns:
the showCurrentAtPos option value

setShowMonthAfterYear

public InlineDatePicker<T> setShowMonthAfterYear(boolean showMonthAfterYear)
Whether to show the month after the year in the header.

Parameters:
showMonthAfterYear -
Returns:
instance of the current component

isShowMonthAfterYear

public boolean isShowMonthAfterYear()
Returns:
the showMonthAfterYear option value

setShowOn

public 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').

Parameters:
showOn -
Returns:
instance of the current component

getShowOn

public DatePicker.ShowOnEnum getShowOn()
Returns:
the showOn option value

setShowOptions

public 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.

Parameters:
showOptions -
Returns:
instance of the current component

getShowOptions

public ListItemOptions<LiteralOption> getShowOptions()
Returns:
the showOptions option value

setShowWeek

public InlineDatePicker<T> setShowWeek(boolean showWeek)
When true a column is added to show the week of the year. The calculateWeek option determines how the week of the year is calculated. You may also want to change the firstDay option.

Returns:
instance of the current component

isShowWeek

public boolean isShowWeek()
Returns:
the showWeek option

setStepMonths

public InlineDatePicker<T> setStepMonths(short stepMonths)
Sets the number of months stepped when the next/previous button are hit.

Returns:
instance of the current component

getStepMonths

public short getStepMonths()
Returns the number of months stepped when the next/previous button are hit.


setDateFormat

public InlineDatePicker<T> setDateFormat(String dateFormat)
Sets the ISO date format to use. The format can be combinations of the following:

Returns:
instance of the current component

getDateFormat

public String getDateFormat()
Returns the ISO date format to use.


setDayNames

public InlineDatePicker<T> setDayNames(ArrayOfDayNames dayNames)
Set's the list of long day names, starting from Sunday, for use as requested via the dateFormat setting. They also appear as popup hints when hovering over the corresponding column headings. This attribute is one of the regionalisation attributes.

Parameters:
dayNames -
Returns:
instance of the current component

getDayNames

public ArrayOfDayNames getDayNames()
Returns:
the dayNames option value

setDayNamesMin

public InlineDatePicker<T> setDayNamesMin(ArrayOfDayNames dayNamesMin)
Set's the list of minimised day names, starting from Sunday, for use as column headers within the datepicker. This attribute is one of the regionalisation attributes.

Parameters:
dayNamesMin -
Returns:
instance of the current component

getDayNamesMin

public ArrayOfDayNames getDayNamesMin()
Returns:
the dayNamesMin option value

setDayNamesShort

public InlineDatePicker<T> setDayNamesShort(ArrayOfDayNames dayNamesShort)
Set's the list of abbreviated day names, starting from Sunday, for use as requested via the dateFormat setting. This attribute is one of the regionalisation attributes.

Parameters:
dayNamesShort -
Returns:
instance of the current component

getDayNamesShort

public ArrayOfDayNames getDayNamesShort()
Returns:
the dayNamesShort option value

setDefaultDate

public InlineDatePicker<T> setDefaultDate(DateOption defaultDate)
Set the date to highlight on first opening if the field is blank. Specify either an actual date via a Date object, or a number of days from today (e.g. +7) or a string of values and periods ('y' for years, 'm' for months, 'w' for weeks, 'd' for days, e.g. '+1m +7d'), or null for today.

Parameters:
defaultDate -
Returns:
instance of the current component

getDefaultDate

public DateOption getDefaultDate()
Returns:
the defaultDate option value

setDisabled

public InlineDatePicker<T> setDisabled(boolean disabled)
Disables (true) or enables (false) the datepicker. Can be set when initialising (first creating) the datepicker.

Parameters:
disabled -
Returns:
instance of the current behavior

isDisabled

public boolean isDisabled()
Returns:
the disabled option

setDuration

public 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.

Parameters:
duration -
Returns:
instance of the current component

getDuration

public DatePickerDuration getDuration()
Returns:
the duration option value

setBeforeShowEvent

public InlineDatePicker<T> setBeforeShowEvent(JsScopeUiEvent beforeShow)
Set's the callback before the datepicker is displayed.

Parameters:
beforeShow -
Returns:
instance of the current component

setBeforeShowDayEvent

public 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. It is called for each day in the datepicker before is it displayed.

Parameters:
beforeShowDay -
Returns:
instance of the current component

setOnChangeMonthYearEvent

public InlineDatePicker<T> setOnChangeMonthYearEvent(JsScopeUiDatePickerOnChangeEvent onChangeMonthYear)
Allows you to define your own event when the datepicker moves to a new month and/or year. The function receives the selected year, month (1-12), and the datepicker instance as parameters. this refers to the associated input field.

Parameters:
onChangeMonthYear -
Returns:
instance of the current component

setOnCloseEvent

public InlineDatePicker<T> setOnCloseEvent(JsScopeUiDatePickerDateTextEvent onClose)
Allows you to define your own event when the datepicker is closed, whether or not a date is selected. The function receives the selected date as text and the datepicker instance as parameters. this refers to the associated input field.

Parameters:
onClose -
Returns:
instance of the current component

setOnSelectEvent

public InlineDatePicker<T> setOnSelectEvent(JsScopeUiDatePickerDateTextEvent onSelect)
Allows you to define your own event when the datepicker is selected. The function receives the selected date as text and the datepicker instance as parameters. this refers to the associated input field.

Parameters:
onSelect -
Returns:
instance of the current component

destroy

public JsStatement destroy()
Method to destroy the datepicker This will return the element back to its pre-init state.

Returns:
the associated JsStatement

destroy

public void destroy(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to destroy the datepicker within the ajax request

Parameters:
ajaxRequestTarget -

disable

public JsStatement disable()
Method to disable the datepicker

Returns:
the associated JsStatement

disable

public void disable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to disable the datepicker within the ajax request

Parameters:
ajaxRequestTarget -

enable

public JsStatement enable()
Method to enable the datepicker

Returns:
the associated JsStatement

enable

public void enable(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to enable the datepicker within the ajax request

Parameters:
ajaxRequestTarget -

getDate

public JsStatement getDate()
Method returning the current date for the datepicker

Returns:
the associated JsStatement

hide

public JsStatement hide(short speed)
Method to hide the datepicker

Parameters:
speed - The speed at which to close the date picker.
Returns:
the associated JsStatement

hide

public void hide(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget,
                 short speed)
Method to hide the datepicker within the ajax request

Parameters:
ajaxRequestTarget -
speed - The speed at which to close the date picker.

hide

public JsStatement hide()
Method to hide the datepicker

Returns:
the associated JsStatement

hide

public void hide(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to hide the datepicker within the ajax request

Parameters:
ajaxRequestTarget -

setDate

public JsStatement setDate(DateOption dateOption)
Method to set the date of the datepicker

Parameters:
dateOption - Date to set
Returns:
the associated JsStatement

setDate

public void setDate(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget,
                    DateOption dateOption)
Method to set the date of the datepicker within the ajax request

Parameters:
ajaxRequestTarget -
dateOption - Date to set

show

public JsStatement show()
Method to show the datepicker

Returns:
the associated JsStatement

show

public void show(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Method to show the datepicker within the ajax request

Parameters:
ajaxRequestTarget -


Copyright © 2012. All Rights Reserved.