import { useId } from 'react' import * as React from 'react' import type { DatePickerProps } from '@planview/pv-uikit' import { DatePicker as UIKitDatePicker } from '@planview/pv-uikit' import Field from '../field' type Props = Omit< DatePickerProps, 'error' | 'goToToday' | 'clearDate' | 'required' | 'warning' > & Pick< React.ComponentPropsWithRef, 'label' | 'error' | 'withAsterisk' | 'labelPosition' | 'warning' > & { id?: string } /** * Implementation combines [Form Field specification](https://design.planview.com/components/forms/form-field) * with [DatePicker specification](https://design.planview.com/components/forms/date-picker) * * `import { DatePicker } from '@planview/pv-form'` * */ const DatePicker: React.FC = ({ labelPosition, label, error, warning, withAsterisk, id: incomingId, inputProps, ...rest }) => { const internalId = `pv-form-${useId()}` const id = incomingId ?? internalId return ( {(fieldProps) => ( )} ) } export { DatePicker } export default DatePicker