fix(variety): 날짜/시간 입력을 커스텀 DatePicker/TimePicker로 변경
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
73f84fd7ac
commit
c88eb1fb60
2 changed files with 14 additions and 26 deletions
|
|
@ -2,7 +2,9 @@ import { useState, useEffect } from "react";
|
|||
import { useNavigate, useParams } from "react-router-dom";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { motion } from "framer-motion";
|
||||
import { Save, Loader2, Tv, Link2, Image, Calendar, Clock, Users } from "lucide-react";
|
||||
import { Save, Loader2, Tv, Link2, Image, Users } from "lucide-react";
|
||||
import DatePicker from "@/components/pc/admin/common/DatePicker";
|
||||
import TimePicker from "@/components/pc/admin/common/TimePicker";
|
||||
|
||||
import AdminLayout from "@/components/pc/admin/layout/Layout";
|
||||
import Toast from "@/components/common/Toast";
|
||||
|
|
@ -140,12 +142,12 @@ function VarietyEditForm() {
|
|||
</div>
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label className="flex items-center gap-2 text-sm font-medium text-gray-700 mb-1.5"><Calendar size={14} />날짜 *</label>
|
||||
<input type="date" value={date} onChange={(e) => setDate(e.target.value)} className="w-full px-3 py-2.5 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent" />
|
||||
<label className="text-sm font-medium text-gray-700 mb-1.5 block">날짜 *</label>
|
||||
<DatePicker value={date} onChange={setDate} />
|
||||
</div>
|
||||
<div>
|
||||
<label className="flex items-center gap-2 text-sm font-medium text-gray-700 mb-1.5"><Clock size={14} />시간 (선택)</label>
|
||||
<input type="time" value={time} onChange={(e) => setTime(e.target.value)} className="w-full px-3 py-2.5 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent" />
|
||||
<label className="text-sm font-medium text-gray-700 mb-1.5 block">시간 (선택)</label>
|
||||
<TimePicker value={time} onChange={setTime} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@ import { useState } from "react";
|
|||
import { useNavigate } from "react-router-dom";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { motion } from "framer-motion";
|
||||
import { Save, Tv, Link2, Image, Calendar, Clock, Users } from "lucide-react";
|
||||
import { Save, Tv, Link2, Image, Users } from "lucide-react";
|
||||
|
||||
import Toast from "@/components/common/Toast";
|
||||
import DatePicker from "@/components/pc/admin/common/DatePicker";
|
||||
import TimePicker from "@/components/pc/admin/common/TimePicker";
|
||||
import { useToast } from "@/hooks/common";
|
||||
import { useAdminAuth } from "@/hooks/pc/admin";
|
||||
import { getMembers } from "@/api/public/members";
|
||||
|
|
@ -167,28 +169,12 @@ function VarietyForm() {
|
|||
{/* 날짜/시간 */}
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label className="flex items-center gap-2 text-sm font-medium text-gray-700 mb-1.5">
|
||||
<Calendar size={14} />
|
||||
날짜 *
|
||||
</label>
|
||||
<input
|
||||
type="date"
|
||||
value={date}
|
||||
onChange={(e) => setDate(e.target.value)}
|
||||
className="w-full px-3 py-2.5 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"
|
||||
/>
|
||||
<label className="text-sm font-medium text-gray-700 mb-1.5 block">날짜 *</label>
|
||||
<DatePicker value={date} onChange={setDate} />
|
||||
</div>
|
||||
<div>
|
||||
<label className="flex items-center gap-2 text-sm font-medium text-gray-700 mb-1.5">
|
||||
<Clock size={14} />
|
||||
시간 (선택)
|
||||
</label>
|
||||
<input
|
||||
type="time"
|
||||
value={time}
|
||||
onChange={(e) => setTime(e.target.value)}
|
||||
className="w-full px-3 py-2.5 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"
|
||||
/>
|
||||
<label className="text-sm font-medium text-gray-700 mb-1.5 block">시간 (선택)</label>
|
||||
<TimePicker value={time} onChange={setTime} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue