@@ -40,11 +40,6 @@ export default function CreateMatchPage() {
4040 } ) ;
4141 } ;
4242
43- // Get current datetime for min attribute
44- const now = new Date ( ) ;
45- const thirtyMinutesLater = new Date ( now . getTime ( ) + 30 * 60 * 1000 ) ;
46- const minDateTime = thirtyMinutesLater . toISOString ( ) . slice ( 0 , 16 ) ;
47-
4843 const handleSubmit = ( e : React . FormEvent ) => {
4944 e . preventDefault ( ) ;
5045 if ( ! user ) return ;
@@ -55,7 +50,6 @@ export default function CreateMatchPage() {
5550
5651 const newMatch : Match = {
5752 ...formData ,
58- matchDateTime : minDateTime , // Ensure matchTime is at least 30 minutes later
5953 matchStatus : 'OPEN' ,
6054 createdBy : user . id ,
6155 createdAt : new Date ( ) . toISOString ( ) ,
@@ -143,6 +137,7 @@ export default function CreateMatchPage() {
143137 value = { formData . location }
144138 onChange = { handleChange }
145139 required
140+ fullWidth
146141 sx = { {
147142 '& .MuiOutlinedInput-root' : {
148143 fontSize : '1rem' ,
@@ -162,16 +157,12 @@ export default function CreateMatchPage() {
162157 </ Typography >
163158 </ Stack >
164159 < TextField
165- name = "matchTime"
160+ name = "matchDateTime" // name을 matchDateTime으로 수정
166161 type = "datetime-local"
167162 value = { formData . matchDateTime }
168163 onChange = { handleChange }
169164 required
170- sx = { {
171- '& .MuiOutlinedInput-root' : {
172- fontSize : '1rem' ,
173- } ,
174- } }
165+ fullWidth
175166 />
176167 </ Box >
177168
@@ -191,6 +182,11 @@ export default function CreateMatchPage() {
191182 value = { formData . maxPlayers }
192183 onChange = { handleChange }
193184 required
185+ fullWidth
186+ inputProps = { {
187+ min : 2 ,
188+ max : 22 ,
189+ } }
194190 helperText = "2명 이상 22명 이하로 설정해주세요"
195191 sx = { {
196192 '& .MuiOutlinedInput-root' : {
0 commit comments