-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Form.datetime_select/3 builder example uses deprecated ~e
sigil
#363
Comments
@michallepicki can you please check if it works with ~H, and if it does, send a PR? Thank you. |
@michallepicki sorry, I couldn't figure it out, I settled on |
Did you get an error or something? |
def my_datetime_select(form, field, opts \\ []) do
builder = fn b ->
~H"""
Date: <%= b.(:day, []) %> / <%= b.(:month, []) %> / <%= b.(:year, []) %>
Time: <%= b.(:hour, []) %> : <%= b.(:minute, []) %>
"""
end
datetime_select(form, field, [builder: builder] ++ opts)
end Error:
Maybe this needs to be a functional |
you always need an assigns attribute before, something like this would work: assigns = %{b: b}
~H"""
""" and then you use |
https://hexdocs.pm/phoenix_html/3.1.0/Phoenix.HTML.Form.html#datetime_select/3-builder
The
def my_datetime_select
example should probably use a~H
sigil?The text was updated successfully, but these errors were encountered: