@abgov/react-components 5.5.0 → 5.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.mjs CHANGED
@@ -2832,14 +2832,17 @@ function GoAInputDateTime({
2832
2832
  value,
2833
2833
  min = "",
2834
2834
  max = "",
2835
+ step,
2835
2836
  ...props
2836
2837
  }) {
2838
+ const formatString = step === 1 ? "yyyy-MM-dd'T'HH:mm:ss" : "yyyy-MM-dd'T'HH:mm";
2837
2839
  return /* @__PURE__ */ jsx(
2838
2840
  GoAInput,
2839
2841
  {
2840
2842
  ...props,
2843
+ step,
2841
2844
  onChange: onDateChangeHandler(props.onChange),
2842
- value: toString(value, "yyyy-MM-dd'T'HH:mm"),
2845
+ value: toString(value, formatString),
2843
2846
  type: "datetime-local"
2844
2847
  }
2845
2848
  );