diff --git a/app/views/downtimes/_datetime_fields.html.erb b/app/views/downtimes/_datetime_fields.html.erb
new file mode 100644
index 000000000..2861a4975
--- /dev/null
+++ b/app/views/downtimes/_datetime_fields.html.erb
@@ -0,0 +1,48 @@
+<%
+ date_legend_text ||= nil
+ time_legend_text ||= nil
+
+ year ||= nil
+ month ||= nil
+ day ||= nil
+ date_input_items = []
+ date_input_items << day if day
+ date_input_items << month if month
+ date_input_items << year if year
+ date_input_items = nil unless date_input_items.any?
+
+ hour ||= nil
+ minute ||= nil
+ time_input_items = []
+ time_input_items << hour if hour
+ time_input_items << minute if minute
+ time_input_items = nil unless time_input_items.any?
+%>
+
+
+
+
+ <%= render "govuk_publishing_components/components/fieldset", {
+ legend_text: date_legend_text,
+ heading_size: "m"
+ } do %>
+ <%= render "govuk_publishing_components/components/date_input", {
+ hint: "For example, 01 08 2022",
+ items: date_input_items,
+ } %>
+ <% end %>
+
+
+ <%= render "govuk_publishing_components/components/fieldset", {
+ legend_text: time_legend_text,
+ heading_size: "m"
+ } do %>
+ <%= render "time_input", {
+ hint: "For example, 9:30 or 19:30",
+ items: time_input_items,
+ } %>
+ <% end %>
+
+
+
+
diff --git a/app/views/downtimes/_form.html.erb b/app/views/downtimes/_form.html.erb
index 952a5375b..9170aca2a 100644
--- a/app/views/downtimes/_form.html.erb
+++ b/app/views/downtimes/_form.html.erb
@@ -1,64 +1,66 @@
<%= f.hidden_field :artefact_id %>
-<%= render :partial => 'shared/error_summary', locals: { object: @downtime} %>
+<%= render :partial => 'shared/legacy_error_summary', locals: { object: @downtime} %>
-
-
-
-
- <%= render "govuk_publishing_components/components/fieldset", {
- legend_text: "From date",
- heading_size: "m"
- } do %>
- <%= render "govuk_publishing_components/components/date_input", {
- hint: "For example, 01 08 2022",
- name: "from-date"
- } %>
- <% end %>
-
-
- <%= render "govuk_publishing_components/components/fieldset", {
- legend_text: "From time",
- heading_size: "m"
- } do %>
- <%= render "time_input", {
- hint: "For example, 9:30 or 19:30",
- name: "from-time"
- } %>
- <% end %>
-
-
-
-
+<%= render partial: "downtimes/datetime_fields", locals: {
+ date_legend_text: "From date",
+ time_legend_text: "From time",
+ year: {
+ name: "downtime[start_time(1i)]",
+ label: "Year",
+ width: 4,
+ },
+ month: {
+ name: "downtime[start_time(2i)]",
+ label: "Month",
+ width: 2,
+ },
+ day: {
+ name: "downtime[start_time(3i)]",
+ label: "Day",
+ width: 2,
+ },
+ hour: {
+ name: "downtime[start_time(4i)]",
+ label: "Hour",
+ width: 2,
+ },
+ minute: {
+ name: "downtime[start_time(5i)]",
+ label: "Minute",
+ width: 2,
+ },
+} %>
-
-
-
-
- <%= render "govuk_publishing_components/components/fieldset", {
- legend_text: "To date",
- heading_size: "m"
- } do %>
- <%= render "govuk_publishing_components/components/date_input", {
- hint: "For example, 01 08 2022",
- name: "to-date"
- } %>
- <% end %>
-
-
- <%= render "govuk_publishing_components/components/fieldset", {
- legend_text: "To time",
- heading_size: "m"
- } do %>
- <%= render "time_input", {
- hint: "For example, 9:30 or 19:30",
- name: "to-time"
- } %>
- <% end %>
-
-
-
-
+<%= render partial: "downtimes/datetime_fields", locals: {
+ date_legend_text: "To date",
+ time_legend_text: "To time",
+ year: {
+ name: "downtime[end_time(1i)]",
+ label: "Year",
+ width: 4,
+ },
+ month: {
+ name: "downtime[end_time(2i)]",
+ label: "Month",
+ width: 2,
+ },
+ day: {
+ name: "downtime[end_time(3i)]",
+ label: "Day",
+ width: 2,
+ },
+ hour: {
+ name: "downtime[end_time(4i)]",
+ label: "Hour",
+ width: 2,
+ },
+ minute: {
+ name: "downtime[end_time(5i)]",
+ label: "Minute",
+ width: 2,
+ },
+} %>
diff --git a/app/views/legacy_downtimes/_form.html.erb b/app/views/legacy_downtimes/_form.html.erb
index b64bfc91d..5dce34884 100644
--- a/app/views/legacy_downtimes/_form.html.erb
+++ b/app/views/legacy_downtimes/_form.html.erb
@@ -1,6 +1,6 @@
<%= f.hidden_field :artefact_id %>
-<%= render :partial => 'shared/error_summary', locals: { object: @downtime} %>
+<%= render :partial => 'shared/legacy_error_summary', locals: { object: @downtime} %>