Module wicket.bootstrap.extensions
Class TempusDominusLocalizationConfig
java.lang.Object
de.agilecoders.wicket.jquery.CombinableConfig
de.agilecoders.wicket.jquery.AbstractConfig
de.agilecoders.wicket.extensions.markup.html.bootstrap.form.tempusdominus.TempusDominusLocalizationConfig
- All Implemented Interfaces:
de.agilecoders.wicket.jquery.Config,Serializable,IClusterable
public class TempusDominusLocalizationConfig
extends de.agilecoders.wicket.jquery.AbstractConfig
Config of datetime picker plugin.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringtoJavaScriptDateFormat(String _fmt) <T extends Temporal>
TempusDominusLocalizationConfigWill add restrictions based on class Date/LocalDate/LocalTime/LocalDateTime etc.Will add given format to the Map These options describe shorthand format strings.withDateFormats(Map<String, String> map) Will add Map with given formatswithDayViewHeaderFormat(Map<String, String> format) withDecrementHour(String label) withDecrementMinute(String label) withDecrementSecond(String label) withFormat(String format) withIncrementHour(String label) withIncrementMinute(String label) withIncrementSecond(String label) withJavaFormat(String format) NOTE: this format is used for parsing Java date, so this should be valid Java formatwithLocale(String locale) This method will set locale as StringwithLocale(Locale locale) This method will set locale and date/time formats based on Locale passedwithNextCentury(String label) withNextDecade(String label) withNextMonth(String label) withNextYear(String label) withOrdinal(String ordinalFunc) withPickHour(String label) withPickMinute(String label) withPickSecond(String label) withPreviousCentury(String label) withPreviousDecade(String label) withPreviousMonth(String label) withPreviousYear(String label) withSelectDate(String label) withSelectDecade(String label) withSelectMonth(String label) withSelectTime(String label) withSelectYear(String label) withStartOfTheWeek(int start) withToggleMeridiem(String label) 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
-
TempusDominusLocalizationConfig
public TempusDominusLocalizationConfig()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
-
withToday
- Parameters:
label- Label for "Go to today"- Returns:
- current instance
-
withClear
- Parameters:
label- Label for "Clear selection"- Returns:
- current instance
-
withClose
- Parameters:
label- Label for "Close the picker"- Returns:
- current instance
-
withSelectMonth
- Parameters:
label- Label for "Select Month"- Returns:
- current instance
-
withPreviousMonth
- Parameters:
label- Label for "Previous Month"- Returns:
- current instance
-
withNextMonth
- Parameters:
label- Label for "Next Month"- Returns:
- current instance
-
withSelectYear
- Parameters:
label- Label for "Select Year"- Returns:
- current instance
-
withPreviousYear
- Parameters:
label- Label for "Previous Year"- Returns:
- current instance
-
withNextYear
- Parameters:
label- Label for "Next Year"- Returns:
- current instance
-
withSelectDecade
- Parameters:
label- Label for "Select Decade"- Returns:
- current instance
-
withPreviousDecade
- Parameters:
label- Label for "Previous Decade"- Returns:
- current instance
-
withNextDecade
- Parameters:
label- Label for "Next Decade"- Returns:
- current instance
-
withPreviousCentury
- Parameters:
label- Label for "Previous Century"- Returns:
- current instance
-
withNextCentury
- Parameters:
label- Label for "Next Century"- Returns:
- current instance
-
withPickHour
- Parameters:
label- Label for "Pick Hour"- Returns:
- current instance
-
withIncrementHour
- Parameters:
label- Label for "Increment Hour"- Returns:
- current instance
-
withDecrementHour
- Parameters:
label- Label for "Decrement Hour"- Returns:
- current instance
-
withPickMinute
- Parameters:
label- Label for "Pick Minute"- Returns:
- current instance
-
withIncrementMinute
- Parameters:
label- Label for "Increment Minute"- Returns:
- current instance
-
withDecrementMinute
- Parameters:
label- Label for "Decrement Minute"- Returns:
- current instance
-
withPickSecond
- Parameters:
label- Label for "Pick Second"- Returns:
- current instance
-
withIncrementSecond
- Parameters:
label- Label for "Increment Second"- Returns:
- current instance
-
withDecrementSecond
- Parameters:
label- Label for "Decrement Second"- Returns:
- current instance
-
withToggleMeridiem
- Parameters:
label- Label for "Toggle Period"- Returns:
- current instance
-
withSelectTime
- Parameters:
label- Label for "Select Time"- Returns:
- current instance
-
withSelectDate
- Parameters:
label- Label for "Select Date"- Returns:
- current instance
-
withDayViewHeaderFormat
- Parameters:
format- This should be an appropriate value from the Intl.DateFormat options.- Returns:
- current instance
-
withLocale
This method will set locale and date/time formats based on Locale passed- Parameters:
locale- This should be a BCP 47 language tag or a value supported by Intl.- Returns:
- current instance
-
withLocale
This method will set locale as String- Parameters:
locale- This should be a BCP 47 language tag or a value supported by Intl.- Returns:
- current instance
-
withStartOfTheWeek
- Parameters:
start- Changes the start of the week to the provided index. Intl/Date does not provide apis to get the locale's start of the week. 0 = Sunday, 6 = Saturday. If you want the calendar view to start on Monday, set this option to 1.- Returns:
- current instance
-
withHourCycle
public TempusDominusLocalizationConfig withHourCycle(TempusDominusLocalizationConfig.HourCycleType cycle) - Parameters:
cycle- Changes how the hours are displayed. If left undefined, the picker will attempt to guess.- Returns:
- current instance
-
withDateFormats
Will add Map with given formats- Parameters:
map- - map of formats- Returns:
- current instance
-
withDateFormat
public TempusDominusLocalizationConfig withDateFormat(TempusDominusLocalizationConfig.DateFormatType type, String format) Will add given format to the Map These options describe shorthand format strings.- Parameters:
type- - which format to setformat- - format as String- Returns:
- current instance
-
withOrdinal
- Parameters:
ordinalFunc- Function to convert cardinal numbers to ordinal numbers, e.g. 3 -> third.- Returns:
- current instance
-
withFormat
- Parameters:
format- Default tokenized format to use (Can be JS date/time/date-time format or DateFormatType.name()).- Returns:
- current instance
-
withJavaFormat
NOTE: this format is used for parsing Java date, so this should be valid Java format- Parameters:
format- Default tokenized format to use.- Returns:
- current instance
-
toJavaScriptDateFormat
-
getJavaFormat
-
getLocale
-