Interface DateField<F extends DateField<F>>

    • Method Detail

      • defaultNow

        default F defaultNow()
        Represents a default value for a date set to the exact moment it is generated on the frontend
        Returns:
        this field for further customization
      • defaultStartOf

        default F defaultStartOf​(DateField.DateStartUnit startUnit)
        Use the current date default starting at the particular unit.
        • defaultStartOf(DateStartUnit.YEAR) = 2018-01-01 00:00:00
        • defaultStartOf(DateStartUnit.HOUR) = 2018-07-12 09:00:00
        Parameters:
        startUnit - the unit the default date should start at, never null
        Returns:
        this field for further customization
      • defaultEndOf

        default F defaultEndOf​(DateField.DateStartUnit endUnit)
        Use the current date default ending at the particular unit. Examples of how the frontend will intepret certain values:
        • defaultEndOf(DateStartUnit.YEAR) = 2018-12-31 23:59:59
        • defaultEndOf(DateStartUnit.HOUR) = 2018-07-12 09:59:00
        Parameters:
        endUnit - the unit the default date should end, never null
        Returns:
        this field for further customization
      • validateIsAfter

        default F validateIsAfter​(String messageKey,
                                  Object... arg)
        Creates a validation schema to verify that a date in this field is after a date in another field.
        Parameters:
        messageKey - the message key of the validation error
        arg - the arguments for the validation method
        Returns:
        this field for further customization
      • hasDateFormat

        default boolean hasDateFormat()
        Checks whether the DateField.Attributes.DATE_FORMAT attribute has been set.
        Returns:
        Whether the attribute is set.