Skip to content

Commit

Permalink
Update Form.datetime_select/3 example to use H sigil (#364)
Browse files Browse the repository at this point in the history
Closes #363
  • Loading branch information
michallepicki committed Nov 22, 2021
1 parent 0f2c4f3 commit 0d5f840
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/phoenix_html/form.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1462,9 +1462,11 @@ defmodule Phoenix.HTML.Form do
def my_datetime_select(form, field, opts \\ []) do
builder = fn b ->
~e"""
Date: <%= b.(:day, []) %> / <%= b.(:month, []) %> / <%= b.(:year, []) %>
Time: <%= b.(:hour, []) %> : <%= b.(:minute, []) %>
assigns = %{b: b}
~H"""
Date: <%= @b.(:day, []) %> / <%= @b.(:month, []) %> / <%= @b.(:year, []) %>
Time: <%= @b.(:hour, []) %> : <%= @b.(:minute, []) %>
"""
end
Expand Down

0 comments on commit 0d5f840

Please sign in to comment.