feat(ux): 날짜 입력 캘린더 전환 - 일정등록 datetime-local (surgical, 캘린더 파일만)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
GUARDiA 2026-07-05 08:43:20 +09:00
parent f455563328
commit 542bbd1985
2 changed files with 7 additions and 6 deletions

View File

@ -6,7 +6,7 @@ import { PageHeader, Toolbar, Table, Modal, Button, Field, TextInput, Select, ty
export interface FormFieldSpec {
key: string
label: string
type?: 'text' | 'number' | 'select' | 'textarea' | 'checkbox'
type?: 'text' | 'number' | 'select' | 'textarea' | 'checkbox' | 'date' | 'time' | 'datetime-local'
opts?: string[] | { value: string; label: string }[]
placeholder?: string
required?: boolean
@ -117,7 +117,8 @@ export function CrudForm({ spec, initial, onSave, saving }: {
</label>
) : (
<TextInput className="w-full" type={fs.type === 'number' ? 'number' : 'text'}
<TextInput className="w-full"
type={fs.type === 'number' ? 'number' : (fs.type === 'date' || fs.type === 'time' || fs.type === 'datetime-local') ? fs.type : 'text'}
value={String(f[fs.key] ?? '')} onChange={v => set(fs.key, fs.type === 'number' ? (v === '' ? '' : Number(v)) : v)}
placeholder={fs.placeholder} />
)}

View File

@ -32,10 +32,10 @@ export default function AdScheduleList() {
{ key: 'mediaType', label: '미디어 유형', type: 'select', opts: MEDIA },
{ key: 'mediaPath', label: '미디어 경로' },
{ key: 'templateCode', label: '템플릿코드' },
{ key: 'startAt', label: '시작(YYYY-MM-DDTHH:mm)', placeholder: '2026-07-01T09:00' },
{ key: 'endAt', label: '종료(YYYY-MM-DDTHH:mm)', placeholder: '2026-07-31T22:00' },
{ key: 'dailyStart', label: '일일 시작(HH:mm)', placeholder: '09:00' },
{ key: 'dailyEnd', label: '일일 종료(HH:mm)', placeholder: '22:00' },
{ key: 'startAt', label: '시작 일시', type: 'datetime-local' },
{ key: 'endAt', label: '종료 일시', type: 'datetime-local' },
{ key: 'dailyStart', label: '일일 시작 시각', type: 'time' },
{ key: 'dailyEnd', label: '일일 종료 시각', type: 'time' },
{ key: 'priority', label: '우선순위(1~10)', type: 'number' },
{ key: 'status', label: '상태', type: 'select', opts: STATUS },
]}