@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/ueditor.cjs CHANGED
@@ -4597,6 +4597,7 @@ var init_DatePicker = __esm({
4597
4597
  id,
4598
4598
  value,
4599
4599
  onChange,
4600
+ formatDate,
4600
4601
  placeholder,
4601
4602
  className,
4602
4603
  disabled = false,
@@ -4805,6 +4806,9 @@ var init_DatePicker = __esm({
4805
4806
  setIsOpen(false);
4806
4807
  };
4807
4808
  const formatDateDisplay = (date) => {
4809
+ if (formatDate) {
4810
+ return formatDate(date);
4811
+ }
4808
4812
  return date.toLocaleDateString(locale === "vi" ? "vi-VN" : "en-US", {
4809
4813
  day: "numeric",
4810
4814
  month: "long",
@@ -5264,6 +5268,7 @@ var init_DatePicker = __esm({
5264
5268
  startDate,
5265
5269
  endDate,
5266
5270
  onChange,
5271
+ formatDate,
5267
5272
  placeholder = "Select date range...",
5268
5273
  className,
5269
5274
  label,
@@ -5296,10 +5301,11 @@ var init_DatePicker = __esm({
5296
5301
  }, []);
5297
5302
  const getRangeString = React15.useCallback((s, e) => {
5298
5303
  if (!s) return "";
5299
- const startStr = formatDateShort(s, locale);
5304
+ const startStr = formatDate ? formatDate(s) : formatDateShort(s, locale);
5300
5305
  if (!e) return `${startStr} - `;
5301
- return `${startStr} - ${formatDateShort(e, locale)}`;
5302
- }, [locale]);
5306
+ const endStr = formatDate ? formatDate(e) : formatDateShort(e, locale);
5307
+ return `${startStr} - ${endStr}`;
5308
+ }, [locale, formatDate]);
5303
5309
  React15.useEffect(() => {
5304
5310
  setInputValue((currentInput) => {
5305
5311
  if (startDate) {
@@ -5843,7 +5849,7 @@ var init_DatePicker = __esm({
5843
5849
  )
5844
5850
  ] })
5845
5851
  ] });
5846
- const displayFormat = (date) => formatDateShort(date);
5852
+ const displayFormat = (date) => formatDate ? formatDate(date) : formatDateShort(date);
5847
5853
  const displayLabel = tempStart && tempEnd ? `${displayFormat(tempStart)} - ${displayFormat(tempEnd)}` : tempStart ? `${displayFormat(tempStart)} - ...` : placeholder;
5848
5854
  const effectiveError = localRequiredError;
5849
5855
  const autoId = (0, import_react19.useId)();