DateTimeSelect

Generates select tags for datetime


Provides a wrapper for Phoenix.HTML.Form's datetime_select/3 function.

All options passed via opts will be sent to datetime_select/3, value, default, year, month, day, hour, minute, second and builder can be set directly and will override anything in opts.


# Public API

Name Description Type Values Default
id The id prefix for underlying select fields.

:string
form The form identifier.

:form
field The field name.

:any
name The name prefix for underlying select fields.

:string
value Value to pre-populate the select.

:any
default Default value to use when none was given in 'value' and none is available in the form data.

:any
year Options passed to the underlying 'year' select.

:keyword
month Options passed to the underlying 'month' select.

:keyword
day Options passed to the underlying 'day' select.

:keyword
hour Options passed to the underlying 'day' select.

:keyword
minute Options passed to the underlying 'day' select.

:keyword
second Options passed to the underlying 'day' select.

:keyword
builder 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.

:fun
opts Options list.

:keyword []