Module wicket.bootstrap.extensions
Class TempusDominusDisplayConfig
java.lang.Object
de.agilecoders.wicket.jquery.CombinableConfig
de.agilecoders.wicket.jquery.AbstractConfig
de.agilecoders.wicket.extensions.markup.html.bootstrap.form.tempusdominus.TempusDominusDisplayConfig
- All Implemented Interfaces:
de.agilecoders.wicket.jquery.Config,Serializable,IClusterable
public class TempusDominusDisplayConfig
extends de.agilecoders.wicket.jquery.AbstractConfig
Config of datetime picker plugin.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumstatic enumstatic enumstatic enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionwithButton(TempusDominusDisplayConfig.ButtonType type, boolean value) Will add given type to the MapwithCalendarWeeks(boolean calendarWeeks) <T extends Temporal>
TempusDominusDisplayConfigWill add restrictions based on class Date/LocalDate/LocalTime/LocalDateTime etc.withComponent(TempusDominusDisplayConfig.ComponentType cmp, boolean on) Will add given component to the Map These options turns on or off the particular views.withIcons(Consumer<TempusDominusIconConfig> cfgUpdater) withInline(boolean inline) withKeepOpen(boolean keep) withSideBySide(boolean sideBySide) 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
-
TempusDominusDisplayConfig
public TempusDominusDisplayConfig()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
-
withIcons
- Parameters:
cfgUpdater- Consumer accepting TempusDominusIconConfig so it can be updated: Any icon library that expects icons to be used like <i class='fas fa-calendar'></i> will work, provided you include the correct styles and scripts needed.- Returns:
- current instance
-
withSideBySide
- Parameters:
sideBySide- Displays the date and time pickers side by side.- Returns:
- current instance
-
withCalendarWeeks
- Parameters:
calendarWeeks- Displays an additional column with the calendar week for that week.- Returns:
- current instance
-
withViewMode
- Parameters:
view- The default view when the picker is displayed. Set to "years" for a date of birth picker.- Returns:
- current instance
-
withToolbarPlacement
public TempusDominusDisplayConfig withToolbarPlacement(TempusDominusDisplayConfig.ToolbarPlacementType place) - Parameters:
place- Changes the placement of the toolbar where the today, clear, component switch icon are located.- Returns:
- current instance
-
withKeepOpen
- Parameters:
keep- Keep the picker window open even after a date selection.- Returns:
- current instance
-
withButton
public TempusDominusDisplayConfig withButton(TempusDominusDisplayConfig.ButtonType type, boolean value) Will add given type to the Map- Parameters:
type- - Type of the button to set visibilityvalue- - Visible or not- Returns:
- current instance
-
withComponent
public TempusDominusDisplayConfig withComponent(TempusDominusDisplayConfig.ComponentType cmp, boolean on) Will add given component to the Map These options turns on or off the particular views. If option is false for date the user would only be able to select month and year for instance.- Parameters:
cmp- - view nameon- - visible or not- Returns:
- current instance
-
withInline
- Parameters:
inline- Displays the picker in a inline div instead of a popup.- Returns:
- current instance
-
withTheme
- Parameters:
theme- Specifies which theme to use, light mode or dark mode. When set to auto, it will auto detect based on settings of the user's system.- Returns:
- current instance
-