View Source Backpex.Fields.DateTime (Backpex v0.6.0)

A field for handling a date time value.

Options

  • :format - Format string which will be used to format the date time value. Defaults to %Y-%m-%d %I:%M %p
  • :debounce - Optional integer timeout value (in milliseconds), "blur" or function that receives the assigns.
  • :throttle - Optional integer timeout value (in milliseconds) or function that receives the assigns.

Example

@impl Backpex.LiveResource
def fields do
  [
    created_at: %{
      module: Backpex.Fields.DateTime,
      label: "Created At",
      format: "%Y.%m.%d %I:%M %p" # optional
    }
  ]
end