mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 07:31:14 -05:00
feat: Implement enhanced date picker component
This commit is contained in:
@@ -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) */}
|
||||
|
||||
Reference in New Issue
Block a user