Skip to content

Commit 426dc0f

Browse files
Fix:time input shows up when link is going to be created
1 parent 4c77426 commit 426dc0f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/cesium_link_web/live/link_live/form_component.ex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ defmodule CesiumLinkWeb.LinkLive.FormComponent do
1919
<.input field={@form[:emoji]} type="emoji" label="Emoji" />
2020
<.input field={@form[:url]} type="text" label="URL" />
2121
<.input field={@form[:attention]} type="checkbox" label="Attention" />
22-
<.input field={@form[:publish_at]} type="datetime-local" label="Publish At" />
22+
<%= if @action == :new do %>
23+
<.input field={@form[:publish_at]} type="datetime-local" label="Publish At" />
24+
<% end %>
2325
<:actions>
2426
<.button phx-disable-with="Saving...">Save Link</.button>
2527
</:actions>

0 commit comments

Comments
 (0)