Module wicket.bootstrap.extensions
Class TempusDominusConfig
java.lang.Object
de.agilecoders.wicket.jquery.CombinableConfig
de.agilecoders.wicket.jquery.AbstractConfig
de.agilecoders.wicket.extensions.markup.html.bootstrap.form.tempusdominus.TempusDominusConfig
- All Implemented Interfaces:
de.agilecoders.wicket.jquery.Config,Serializable,IClusterable
public class TempusDominusConfig
extends de.agilecoders.wicket.jquery.AbstractConfig
Config of datetime picker plugin.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <U> StringformatDateISO(U date) Deprecated, for removal: This API element is subject to removal in a future version.This method was initially designed to return Java-based Date format But it has the same name as "localisation->format"withAllowInputToggle(boolean allow) <T extends Temporal>
TempusDominusConfigWill add restrictions based on class Date/LocalDate/LocalTime/LocalDateTime etc.withContainer(String container) withDateRange(boolean dateRange) withDefaultDate(Date defDate) <T extends Temporal>
TempusDominusConfigwithDefaultDate(T defDate) withDisplay(Consumer<TempusDominusDisplayConfig> cfgUpdater) withIcons(Consumer<TempusDominusIconConfig> cfgUpdater) Shortcut for Display -> IconswithKeepInvalid(boolean keep) withLocalization(Consumer<TempusDominusLocalizationConfig> cfgUpdater) withMultipleDates(boolean multiple) withMultipleDatesSeparator(String separator) withPromptTimeOnDateChange(boolean prompt) withPromptTimeOnDateChangeTransitionDelay(int delay) withRestrictions(Consumer<TempusDominusRestrictionsConfig> cfgUpdater) withStepping(int step) withUseCurrent(boolean use) withViewDate(Date date) <T extends Temporal>
TempusDominusConfigwithViewDate(T date) Methods inherited from class de.agilecoders.wicket.jquery.AbstractConfig
all, contains, get, getString, isEmpty, newKey, put, remove, toJsonString, wrapMethods inherited from class de.agilecoders.wicket.jquery.CombinableConfig
combine, withFallback
-
Constructor Details
-
TempusDominusConfig
public TempusDominusConfig()Construct config
-
-
Method Details
-
withClass
Will add restrictions based on class Date/LocalDate/LocalTime/LocalDateTime etc.- Parameters:
clazz- Class of DateTime object to set restrictions- Returns:
- current instance
-
withAllowInputToggle
- Parameters:
allow- If true, the picker will show on textbox focus.- Returns:
- current instance
-
withContainer
- Parameters:
container- Change the target container to use for the widget instead of body (In case of application using shadow DOM for example).- Returns:
- current instance
-
withDateRange
- Parameters:
dateRange- Date Range work similar to multi date. You should also set multiDateSeparator with what you want the two values to be separated with. This option allows the user to select two dates and highlights all the dates in range between. Validation still takes place. The range will be consider invalid if any of the dates in the range are disabled.- Returns:
- current instance
-
withDefaultDate
- Parameters:
defDate- Sets the picker default date/time. Overrides useCurrent- Returns:
- current instance
-
withDefaultDate
- Parameters:
defDate- Sets the picker default date/time. Overrides useCurrent- Returns:
- current instance
-
withDisplay
- Parameters:
cfgUpdater- Consumer accepting TempusDominusDisplayConfig so it can be updated: The display options allow you to control much of the picker's look and feel. You can disable components, buttons and change the default icons.- Returns:
- current instance
-
withIcons
Shortcut for Display -> Icons- Parameters:
cfgUpdater- Consumer accepting TempusDominusIconConfig so it can be updated: The display options allow you to control much of the picker's look and feel. You can disable components, buttons and change the default icons.- Returns:
- current instance
-
withKeepInvalid
- Parameters:
keep- Allows for the user to select a date that is invalid according to the rules.- Returns:
- current instance
-
withLocalization
- Parameters:
cfgUpdater- Consumer accepting TempusDominusDisplayConfig so it can be updated: Most of the localization options are for title tooltips over icons.- Returns:
- current instance
-
withMeta
- Parameters:
map- This property is to provide developers a place to store extra information about the picker.- Returns:
- current instance
-
withMultipleDates
- Parameters:
multiple- Allows multiple dates to be selected.- Returns:
- current instance
-
withMultipleDatesSeparator
- Parameters:
separator- When multipleDates is enabled, this value wil be used to separate the selected dates.- Returns:
- current instance
-
withPromptTimeOnDateChange
- Parameters:
prompt- If enabled and any of the time components are enabled, when a user selects a date the picker will automatically display the clock view after `promptTimeOnDateChangeTransitionDelay`.- Returns:
- current instance
-
withPromptTimeOnDateChangeTransitionDelay
- Parameters:
delay- Used with promptTimeOnDateChange. The number of milliseconds before the picker will display the clock view.- Returns:
- current instance
-
withRestrictions
- Parameters:
cfgUpdater- Consumer accepting TempusDominusDisplayConfig so it can be updated: Restrictions allow you to prevent users from selected dates or times based on a set of rules.- Returns:
- current instance
-
withStepping
- Parameters:
step- Controls how much the minutes are changed by. This also changes the minute selection grid to step by this amount.- Returns:
- current instance
-
withUseCurrent
- Parameters:
use- Determines if the current date/time should be used as the default value when the picker is opened.- Returns:
- current instance
-
withViewDate
- Parameters:
date- Set the view date of the picker. Setting this will not change the selected date(s).- Returns:
- current instance
-
withViewDate
- Parameters:
date- Set the view date of the picker. Setting this will not change the selected date(s).- Returns:
- current instance
-
getFormat
Deprecated, for removal: This API element is subject to removal in a future version.This method was initially designed to return Java-based Date format But it has the same name as "localisation->format"Please use
getJavaFormat()instead.- Returns:
- Date format pattern set for Java-based formatters
-
getJavaFormat
- Returns:
- Date format pattern set for Java-based formatters
-
getLocale
- Returns:
- Date format pattern set for TempusDominusLocalizationConfig.getFormat()
-
formatDateISO
-