diff --git a/admin/app/components/solidus_admin/products/show/component.html.erb b/admin/app/components/solidus_admin/products/show/component.html.erb index 452502c8df2..3289bd88df3 100644 --- a/admin/app/components/solidus_admin/products/show/component.html.erb +++ b/admin/app/components/solidus_admin/products/show/component.html.erb @@ -100,9 +100,20 @@ <%= page_with_sidebar_aside do %> <%= render component('ui/panel').new(title: "Publishing") do %> - <%= render component("ui/forms/field").text_field(f, :available_on, hint: t(".available_on_html"), type: :date) %> - <%= render component("ui/forms/field").text_field(f, :discontinue_on, hint: t(".discontinue_on_html"), type: :date) %> - + <%= render component("ui/forms/field").text_field( + f, + :available_on, + hint: t(".available_on_html"), + type: :date, + value: f.object.available_on&.to_date + ) %> + <%= render component("ui/forms/field").text_field( + f, + :discontinue_on, + hint: t(".discontinue_on_html"), + type: :date, + value: f.object.discontinue_on&.to_date + ) %>