Files
DentalManagement09/apps/Frontend/src/components/ui/dateInputField.jsx
T
GiteadandClaude Sonnet 4.6 1edf73fdc8 feat: add new frontend components, MH batch worker, and gitignore rules
- Add all new Frontend source files (pages, components, hooks, utils)
- Add selenium_MHBatchPaymentCheckWorker.py and MHSinglePaymentCheckWorker.py
- Add install-steps-5-13.sh setup script
- Update .gitignore to exclude runtime/sensitive data (backups, uploads,
  chat-history, keys, downloads, generated .d.ts files) while keeping folders
- Add .gitkeep to preserve empty runtime folders in git

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 00:23:43 -04:00

14 lines
896 B
React

import { format } from "date-fns";
import { FormField, FormItem, FormLabel, FormMessage, } from "@/components/ui/form";
import { DateInput } from "@/components/ui/dateInput";
import { parseLocalDate } from "@/utils/dateUtils";
// THIS COMPONENT MADE FOR USING IN FORM FIELD INSIDE ANY FORM CONTROL, NOT AS INPUT FIELD NORMALLY.
// Here, User can input/paste date in certain format, and also select via calendar
export function DateInputField({ control, name, label, disableFuture, disablePast, }) {
return (<FormField control={control} name={name} render={({ field }) => (<FormItem>
<FormLabel>{label}</FormLabel>
<DateInput value={field.value ? parseLocalDate(field.value) : null} onChange={(date) => field.onChange(date ? format(date, "yyyy-MM-dd") : null)} disableFuture={disableFuture} disablePast={disablePast}/>
<FormMessage />
</FormItem>)}/>);
}