Surface.Components.Form.TimeSelect (surface v0.3.2) View Source
Generates select tags for time.
Provides a wrapper for Phoenix.HTML.Form's time_select/3
function.
All options passed via opts
will be sent to time_select/3
,
value
, default
, hour
, minute
, second
and builder
can be set directly and will override anything in opts
.
Examples
<TimeSelect form="alarm" field="time" />
<Form for={{ :alarm }}>
<TimeSelect field={{ :time }} />
</Form>
Properties
- form :form - The form identifier.
- field :string - The field name.
- id :string - The id prefix for underlying select fields.
- name :string - The name prefix for underlying select fields.
- value :any - Value to pre-populate the select.
- default :any - Default value to use when none was given in 'value' and none is available in the form data.
- hour :keyword - Options passed to the underlying 'day' select.
- minute :keyword - Options passed to the underlying 'day' select.
- second :keyword - Options passed to the underlying 'day' select.
- builder :fun - Specify how the select can be build. It must be a function that receives a builder that should be invoked with the select name and a set of options. .
- opts :keyword, default: [] - Options list.
Link to this section Summary
Functions
Callback implementation for Phoenix.LiveComponent.mount/1
.
Callback implementation for Phoenix.LiveComponent.render/1
.
Callback implementation for Phoenix.LiveComponent.update/2
.
Link to this section Functions
Callback implementation for Phoenix.LiveComponent.mount/1
.
Callback implementation for Phoenix.LiveComponent.render/1
.
Callback implementation for Phoenix.LiveComponent.update/2
.