DateTimeStep: swap date TextField to Input atom for consistency
- Preferred date fields now use Input atom (external label) instead of MUI TextField - Removed unused TextField import - Matches the name field pattern from session 30b Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import TextField from '@mui/material/TextField';
|
|
||||||
import FormControl from '@mui/material/FormControl';
|
import FormControl from '@mui/material/FormControl';
|
||||||
import FormLabel from '@mui/material/FormLabel';
|
import FormLabel from '@mui/material/FormLabel';
|
||||||
import FormControlLabel from '@mui/material/FormControlLabel';
|
import FormControlLabel from '@mui/material/FormControlLabel';
|
||||||
@@ -275,14 +274,13 @@ export const DateTimeStep: React.FC<DateTimeStepProps> = ({
|
|||||||
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 2, mb: 3, pl: 4 }}>
|
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 2, mb: 3, pl: 4 }}>
|
||||||
{values.preferredDates.map((date, index) => (
|
{values.preferredDates.map((date, index) => (
|
||||||
<Box key={index} sx={{ display: 'flex', alignItems: 'flex-start', gap: 1 }}>
|
<Box key={index} sx={{ display: 'flex', alignItems: 'flex-start', gap: 1 }}>
|
||||||
<TextField
|
<Input
|
||||||
label={DATE_LABELS[index] ?? `Preference ${index + 1}`}
|
label={DATE_LABELS[index] ?? `Preference ${index + 1}`}
|
||||||
type="date"
|
type="date"
|
||||||
value={date}
|
value={date}
|
||||||
onChange={(e) => handleDateChange(index, e.target.value)}
|
onChange={(e) => handleDateChange(index, e.target.value)}
|
||||||
error={index === 0 && !!errors?.preferredDates}
|
error={index === 0 && !!errors?.preferredDates}
|
||||||
helperText={index === 0 ? errors?.preferredDates : undefined}
|
helperText={index === 0 ? errors?.preferredDates : undefined}
|
||||||
InputLabelProps={{ shrink: true }}
|
|
||||||
inputProps={{ min: minDate }}
|
inputProps={{ min: minDate }}
|
||||||
fullWidth
|
fullWidth
|
||||||
required={index === 0}
|
required={index === 0}
|
||||||
|
|||||||
Reference in New Issue
Block a user