@underverse-ui/underverse 2.0.41 → 2.0.42

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/dist/index.d.cts CHANGED
@@ -1034,6 +1034,8 @@ interface DatePickerProps {
1034
1034
  id?: string;
1035
1035
  value?: Date;
1036
1036
  onChange: (date: Date | undefined) => void;
1037
+ /** Custom date display formatter function */
1038
+ formatDate?: (date: Date) => string;
1037
1039
  placeholder?: string;
1038
1040
  className?: string;
1039
1041
  disabled?: boolean;
@@ -1066,6 +1068,8 @@ interface DateRangePickerProps {
1066
1068
  startDate?: Date;
1067
1069
  endDate?: Date | null;
1068
1070
  onChange: (start: Date | undefined, end: Date | null | undefined) => void;
1071
+ /** Custom date display formatter function applied to both start and end date */
1072
+ formatDate?: (date: Date) => string;
1069
1073
  placeholder?: string;
1070
1074
  className?: string;
1071
1075
  label?: string;
@@ -1144,6 +1148,8 @@ interface LunarDatePickerProps {
1144
1148
  id?: string;
1145
1149
  value?: LunarPickerValue;
1146
1150
  onChange: (date: LunarPickerValue | undefined) => void;
1151
+ /** Custom date display formatter function */
1152
+ formatDate?: (date: LunarPickerValue) => string;
1147
1153
  placeholder?: string;
1148
1154
  className?: string;
1149
1155
  disabled?: boolean;
@@ -1171,6 +1177,8 @@ interface LunarDateRangePickerProps {
1171
1177
  startDate?: LunarPickerValue;
1172
1178
  endDate?: LunarPickerValue | null;
1173
1179
  onChange: (start: LunarPickerValue | undefined, end: LunarPickerValue | null | undefined) => void;
1180
+ /** Custom date display formatter function applied to both start and end date */
1181
+ formatDate?: (date: LunarPickerValue) => string;
1174
1182
  placeholder?: string;
1175
1183
  className?: string;
1176
1184
  label?: string;
package/dist/index.d.ts CHANGED
@@ -1034,6 +1034,8 @@ interface DatePickerProps {
1034
1034
  id?: string;
1035
1035
  value?: Date;
1036
1036
  onChange: (date: Date | undefined) => void;
1037
+ /** Custom date display formatter function */
1038
+ formatDate?: (date: Date) => string;
1037
1039
  placeholder?: string;
1038
1040
  className?: string;
1039
1041
  disabled?: boolean;
@@ -1066,6 +1068,8 @@ interface DateRangePickerProps {
1066
1068
  startDate?: Date;
1067
1069
  endDate?: Date | null;
1068
1070
  onChange: (start: Date | undefined, end: Date | null | undefined) => void;
1071
+ /** Custom date display formatter function applied to both start and end date */
1072
+ formatDate?: (date: Date) => string;
1069
1073
  placeholder?: string;
1070
1074
  className?: string;
1071
1075
  label?: string;
@@ -1144,6 +1148,8 @@ interface LunarDatePickerProps {
1144
1148
  id?: string;
1145
1149
  value?: LunarPickerValue;
1146
1150
  onChange: (date: LunarPickerValue | undefined) => void;
1151
+ /** Custom date display formatter function */
1152
+ formatDate?: (date: LunarPickerValue) => string;
1147
1153
  placeholder?: string;
1148
1154
  className?: string;
1149
1155
  disabled?: boolean;
@@ -1171,6 +1177,8 @@ interface LunarDateRangePickerProps {
1171
1177
  startDate?: LunarPickerValue;
1172
1178
  endDate?: LunarPickerValue | null;
1173
1179
  onChange: (start: LunarPickerValue | undefined, end: LunarPickerValue | null | undefined) => void;
1180
+ /** Custom date display formatter function applied to both start and end date */
1181
+ formatDate?: (date: LunarPickerValue) => string;
1174
1182
  placeholder?: string;
1175
1183
  className?: string;
1176
1184
  label?: string;
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  extractImageSrcsFromHtml,
5
5
  normalizeImageUrl,
6
6
  prepareUEditorContentForSave
7
- } from "./chunk-GKUKLOSO.js";
7
+ } from "./chunk-7YU3O5JK.js";
8
8
  import {
9
9
  EmojiPicker_default
10
10
  } from "./chunk-VYTIGF3V.js";
@@ -19,7 +19,7 @@ import {
19
19
  DatePicker,
20
20
  DateRangePicker,
21
21
  date_exports
22
- } from "./chunk-C2EHPHWH.js";
22
+ } from "./chunk-YNALZEN6.js";
23
23
  import {
24
24
  Modal_default
25
25
  } from "./chunk-CJ6RPCJN.js";
@@ -6058,6 +6058,7 @@ var LunarDatePicker = ({
6058
6058
  id,
6059
6059
  value,
6060
6060
  onChange,
6061
+ formatDate,
6061
6062
  placeholder,
6062
6063
  className,
6063
6064
  disabled = false,
@@ -6271,6 +6272,9 @@ var LunarDatePicker = ({
6271
6272
  };
6272
6273
  const formatDateDisplay = (date) => {
6273
6274
  if (!date) return "";
6275
+ if (formatDate) {
6276
+ return formatDate(date);
6277
+ }
6274
6278
  const formatStr = date.is_leap_month ? t("lunarLeapFormat") : t("lunarFormat");
6275
6279
  return formatStr.replace("{day}", String(date.day)).replace("{month}", String(date.month)).replace("{year}", String(date.year));
6276
6280
  };
@@ -6740,6 +6744,7 @@ var LunarDateRangePicker = ({
6740
6744
  startDate,
6741
6745
  endDate,
6742
6746
  onChange,
6747
+ formatDate,
6743
6748
  placeholder = "Select lunar date range...",
6744
6749
  className,
6745
6750
  label,
@@ -7183,6 +7188,9 @@ var LunarDateRangePicker = ({
7183
7188
  ] })
7184
7189
  ] });
7185
7190
  const displayFormat = (date) => {
7191
+ if (formatDate) {
7192
+ return formatDate(date);
7193
+ }
7186
7194
  const formatStr = date.is_leap_month ? t("lunarLeapFormat") : t("lunarFormat");
7187
7195
  return formatStr.replace("{day}", String(date.day)).replace("{month}", String(date.month)).replace("{year}", String(date.year));
7188
7196
  };