feat: primereact lib

This commit is contained in:
2025-04-20 14:27:22 +03:00
parent bdb3effaf0
commit a99be691c7
4 changed files with 75 additions and 10 deletions

View File

@@ -0,0 +1,14 @@
import { FunctionComponent } from "preact";
import { Calendar } from "primereact/calendar";
import { FormEvent } from "primereact/ts-helpers";
interface DatePickerProps {
value?: Date;
onChange?: (e: FormEvent<Date>) => void;
}
const DatePicker: FunctionComponent<DatePickerProps> = ({ value = new Date(), onChange }: DatePickerProps) => {
return <Calendar value={value} onChange={onChange} />;
};
export default DatePicker;