feat: Implement enhanced date picker component

This commit is contained in:
gpt-engineer-app[bot]
2025-09-29 16:34:09 +00:00
parent 0c8410c655
commit ae7dc003ce
4 changed files with 108 additions and 12 deletions

View File

@@ -7,6 +7,7 @@ import { Button } from '@/components/ui/button';
import { Textarea } from '@/components/ui/textarea';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { DatePicker } from '@/components/ui/date-picker';
import { Star, Send } from 'lucide-react';
import { useAuth } from '@/hooks/useAuth';
import { supabase } from '@/integrations/supabase/client';
@@ -45,6 +46,7 @@ export function ReviewForm({
handleSubmit,
reset,
setValue,
watch,
formState: {
errors
}
@@ -146,8 +148,13 @@ export function ReviewForm({
{/* Visit Date */}
<div className="space-y-2">
<Label htmlFor="visit_date">Visit Date</Label>
<Input id="visit_date" type="date" {...register('visit_date')} />
<Label>Visit Date</Label>
<DatePicker
date={watch('visit_date') ? new Date(watch('visit_date')) : undefined}
onSelect={(date) => setValue('visit_date', date ? date.toISOString().split('T')[0] : '')}
placeholder="Select visit date"
disableFuture={true}
/>
</div>
{/* Wait Time (for rides) */}