@reachfive/identity-ui 1.32.0 → 1.32.2

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.
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @reachfive/identity-ui - v1.32.0
3
- * Compiled Wed, 05 Feb 2025 16:08:31 UTC
2
+ * @reachfive/identity-ui - v1.32.2
3
+ * Compiled Mon, 10 Feb 2025 15:46:55 UTC
4
4
  *
5
5
  * Copyright (c) ReachFive.
6
6
  *
@@ -6941,26 +6941,28 @@ const datetimeValidator = (locale) => new Validator({
6941
6941
  parameters: { format: dateFormat$2(locale) }
6942
6942
  });
6943
6943
  function dateField({
6944
+ format,
6944
6945
  key = "date",
6945
6946
  label = "date",
6946
- yearDebounce,
6947
6947
  locale,
6948
+ validator,
6949
+ yearDebounce,
6948
6950
  ...props
6949
6951
  }, config) {
6950
6952
  return createField({
6951
6953
  key,
6952
6954
  label,
6953
6955
  ...props,
6954
- format: {
6956
+ format: format ?? {
6955
6957
  bind: (value) => {
6956
6958
  const dt = value ? dateFns.parseISO(value) : void 0;
6957
6959
  return dt && dateFns.isValid(dt) ? { raw: dt } : void 0;
6958
6960
  },
6959
6961
  unbind: (value) => {
6960
- return isRichFormValue(value, "raw") ? dateFns.formatISO(value.raw) : value ? dateFns.formatISO(value) : null;
6962
+ return isRichFormValue(value, "raw") ? dateFns.formatISO(value.raw, { representation: "date" }) : value ? dateFns.formatISO(value, { representation: "date" }) : null;
6961
6963
  }
6962
6964
  },
6963
- validator: props.validator ? datetimeValidator(config.language).and(props.validator) : datetimeValidator(config.language),
6965
+ validator: validator ? datetimeValidator(config.language).and(validator) : datetimeValidator(config.language),
6964
6966
  component: DateField,
6965
6967
  extendedParams: {
6966
6968
  locale: locale ?? config.language,