public class DateTextFieldConfig
extends de.agilecoders.wicket.jquery.AbstractConfig
Configuration holder for all DateTextField configurations.
| Modifier and Type | Class and Description |
|---|---|
static class |
DateTextFieldConfig.Day
holds all week days in a specific sort order.
|
static class |
DateTextFieldConfig.TodayButton
See docs.
|
static class |
DateTextFieldConfig.View
holds all view options.
|
| Constructor and Description |
|---|
DateTextFieldConfig()
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
DateTextFieldConfig |
allowKeyboardNavigation(boolean value)
Whether or not to allow date navigation by arrow keys.
|
DateTextFieldConfig |
autoClose(boolean value)
Whether or not to close the datepicker immediately when a date is selected.
|
DateTextFieldConfig |
calendarWeeks(boolean value) |
DateTextFieldConfig |
clearButton(boolean value) |
DateTextFieldConfig |
forceParse(boolean value)
Whether or not to force parsing of the input value when the picker is closed.
|
String |
getFormat() |
String |
getLanguage() |
DateTextFieldConfig |
highlightToday(boolean value)
If true, highlights the current date.
|
boolean |
isDefaultLanguageSet() |
DateTextFieldConfig |
showTodayButton(DateTextFieldConfig.TodayButton value)
If true, displays a “Today” button at the bottom of the datepicker to select the current date.
|
DateTextFieldConfig |
withEndDate(org.joda.time.DateTime value)
The latest date that may be selected; all later dates will be disabled.
|
DateTextFieldConfig |
withFormat(String value)
The date format (java style), combination of d, dd, m, mm, M, MM, yy, yyyy.
|
DateTextFieldConfig |
withLanguage(String value)
The two-letter code of the language to use for month and day names.
|
DateTextFieldConfig |
withStartDate(org.joda.time.DateTime value)
The earliest date that may be selected; all earlier dates will be disabled.
|
DateTextFieldConfig |
withView(DateTextFieldConfig.View value)
The view that the datepicker should show when it is opened.
|
DateTextFieldConfig |
withWeekStart(DateTextFieldConfig.Day value)
Day of the week start.
|
public String getFormat()
public String getLanguage()
public boolean isDefaultLanguageSet()
public DateTextFieldConfig withStartDate(org.joda.time.DateTime value)
The earliest date that may be selected; all earlier dates will be disabled.
value - the earliest start datepublic DateTextFieldConfig withEndDate(org.joda.time.DateTime value)
The latest date that may be selected; all later dates will be disabled.
value - the latest end datepublic DateTextFieldConfig withLanguage(String value)
The two-letter code of the language to use for month and day names. These will also be used as the input’s value (and subsequently sent to the server in the case of form submissions). Currently ships with English (‘en’), German (‘de’), Brazilian (‘br’), and Spanish (‘es’) translations, but others can be added (see I18N below). If an unknown language code is given, English will be used.
value - two letter language code (optional 5 letter code like de_DE)public DateTextFieldConfig withView(DateTextFieldConfig.View value)
The view that the datepicker should show when it is opened. Accepts values of 0 or ‘month’ for month view (the default), 1 or ‘year’ for the 12-month overview, and 2 or ‘decade’ for the 10-year overview. Useful for date-of-birth datepicker.
value - the start view to usepublic DateTextFieldConfig withFormat(String value)
The date format (java style), combination of d, dd, m, mm, M, MM, yy, yyyy.
value - The date format value (java style)public DateTextFieldConfig withWeekStart(DateTextFieldConfig.Day value)
Day of the week start. 0 (Sunday) to 6 (Saturday)
value - the DateTextFieldConfig.Day the week startspublic DateTextFieldConfig allowKeyboardNavigation(boolean value)
Whether or not to allow date navigation by arrow keys.
value - true, if keyboard navigation is allowedpublic DateTextFieldConfig highlightToday(boolean value)
If true, highlights the current date.
value - If true, highlights the current date.public DateTextFieldConfig showTodayButton(DateTextFieldConfig.TodayButton value)
If true, displays a “Today” button at the bottom of the datepicker to select the current date. If true, the “Today” button will only move the current date into view;
value - whether to show today button or notpublic DateTextFieldConfig forceParse(boolean value)
Whether or not to force parsing of the input value when the picker is closed. That is, when an invalid date is left in the input field by the user, the picker will forcibly parse that value, and set the input’s value to the new, valid date, conforming to the given format.
value - Whether or not to force parsing of the input value when the picker is closedpublic DateTextFieldConfig clearButton(boolean value)
value - Whether or not to display a ‘clear’ button, which allows for clearing the input field.public DateTextFieldConfig calendarWeeks(boolean value)
value - Whether or not to show week numbers to the left of week rows.public DateTextFieldConfig autoClose(boolean value)
Whether or not to close the datepicker immediately when a date is selected.
value - true, if datepicker should close immediately when date is selected.Copyright © 2011–2014 AgileCoders. All rights reserved.