hsuanyi-chou / shadcn-ui-expansions

More components built on top of shadcn-ui.
https://shadcnui-expansions.typeart.cc/
MIT License
856 stars 38 forks source link

How to set minValue for the date picker component #101

Closed gerkim62 closed 2 months ago

gerkim62 commented 3 months ago

Am trying

<DateTimePicker minValue={new Date()} showClearButton={false} onJsDateChange={(date) => field.onChange(date)} />

but am getting

Type 'Date' is not assignable to type 'DateValue | undefined'.

What is that DateValue type ?

hsuanyi-chou commented 3 months ago

DateValue is from react-aria.

https://react-spectrum.adobe.com/react-aria/DatePicker.html

hsuanyi-chou commented 2 months ago

Hi,

I found that react-aria is difficult to maintain and not easy to get started with. For those who are new to it, it takes too much time to go through the documentation and still find it hard to modify. Later, I discovered the time-picker created by openStatus.

Therefore, I rewrote the entire datetimePicker. Although the input method is not as fancy as react-aria, the maintainability should be much better.

Since it has been completely rewritten, the existing issues will be closed.

You can visit datetime-picker to get the new one.

Thank you for your understanding and use.