View Source Backpex.Fields.Time (Backpex v0.9.1)

A field for handling a time value.

Field-specific options

See Backpex.Field for general field options.

  • :format - Format string which will be used to format the date time value or function that formats the date time.

    Can also be a function wich receives a DateTime and must return a string.

    The default value is "%I:%M %p".

  • :debounce - Timeout value (in milliseconds), "blur" or function that receives the assigns.

  • :throttle - Timeout value (in milliseconds) or function that receives the assigns.

  • :readonly - Sets the field to readonly. Also see the panels guide.

Examples

@impl Backpex.LiveResource
def fields do
  [
    created_at: %{
      module: Backpex.Fields.Time,
      label: "Deliver By",
      format: "%I:%M %p"
    }
  ]
end

Summary

Functions

validate_config!(field, live_resource)