Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

1.3 KB
Raw Blame
'use client'

import type { DateTimePickerProps } from '@langgenius/dify-ui/date-time-picker'
import { DateTimePicker as BaseDateTimePicker } from '@langgenius/dify-ui/date-time-picker'
import { getCalendarLocale } from './calendar-locales'
import { usePickerLabels } from './use-picker-labels'

export function DateTimePicker(props: DateTimePickerProps) {
  const defaults = usePickerLabels()
  return (
    <BaseDateTimePicker
      {...defaults}
      {...props}
      placeholder={props.placeholder ?? defaults.labels.backToDate}
      locale={getCalendarLocale(defaults.locale, props.locale)}
      labels={{ ...defaults.labels, ...props.labels }}
    />
  )
}

/* oxlint-disable no-barrel-files/no-barrel-files -- Keep this localized picker and its unchanged parts/types in one component entry. */
export {
  DateTimePickerClear,
  DateTimePickerContent,
  DateTimePickerLabel,
  DateTimePickerTrigger,
  DateTimePickerValue,
} from '@langgenius/dify-ui/date-time-picker'
/** @public */
export type {
  DateTimePickerChangeEventDetails,
  DateTimePickerChangeEventReason,
  DateTimePickerClearProps,
  DateTimePickerContentProps,
  DateTimePickerLabelProps,
  DateTimePickerProps,
  DateTimePickerTriggerProps,
  DateTimePickerValueProps,
} from '@langgenius/dify-ui/date-time-picker'
/* oxlint-enable no-barrel-files/no-barrel-files */