diff --git a/frontend/src/components/Crud.tsx b/frontend/src/components/Crud.tsx index 2388d6a..061904d 100644 --- a/frontend/src/components/Crud.tsx +++ b/frontend/src/components/Crud.tsx @@ -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 }: { 활성 ) : ( - set(fs.key, fs.type === 'number' ? (v === '' ? '' : Number(v)) : v)} placeholder={fs.placeholder} /> )} diff --git a/frontend/src/pages/AdScheduleList.tsx b/frontend/src/pages/AdScheduleList.tsx index acb35f9..55381c7 100644 --- a/frontend/src/pages/AdScheduleList.tsx +++ b/frontend/src/pages/AdScheduleList.tsx @@ -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 }, ]}