feat(ux): 날짜 입력 캘린더 전환 - 일정등록 datetime-local (surgical, 캘린더 파일만)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
f455563328
commit
542bbd1985
@ -6,7 +6,7 @@ import { PageHeader, Toolbar, Table, Modal, Button, Field, TextInput, Select, ty
|
|||||||
export interface FormFieldSpec {
|
export interface FormFieldSpec {
|
||||||
key: string
|
key: string
|
||||||
label: 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 }[]
|
opts?: string[] | { value: string; label: string }[]
|
||||||
placeholder?: string
|
placeholder?: string
|
||||||
required?: boolean
|
required?: boolean
|
||||||
@ -117,7 +117,8 @@ export function CrudForm({ spec, initial, onSave, saving }: {
|
|||||||
활성
|
활성
|
||||||
</label>
|
</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)}
|
value={String(f[fs.key] ?? '')} onChange={v => set(fs.key, fs.type === 'number' ? (v === '' ? '' : Number(v)) : v)}
|
||||||
placeholder={fs.placeholder} />
|
placeholder={fs.placeholder} />
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -32,10 +32,10 @@ export default function AdScheduleList() {
|
|||||||
{ key: 'mediaType', label: '미디어 유형', type: 'select', opts: MEDIA },
|
{ key: 'mediaType', label: '미디어 유형', type: 'select', opts: MEDIA },
|
||||||
{ key: 'mediaPath', label: '미디어 경로' },
|
{ key: 'mediaPath', label: '미디어 경로' },
|
||||||
{ key: 'templateCode', label: '템플릿코드' },
|
{ key: 'templateCode', label: '템플릿코드' },
|
||||||
{ key: 'startAt', label: '시작(YYYY-MM-DDTHH:mm)', placeholder: '2026-07-01T09:00' },
|
{ key: 'startAt', label: '시작 일시', type: 'datetime-local' },
|
||||||
{ key: 'endAt', label: '종료(YYYY-MM-DDTHH:mm)', placeholder: '2026-07-31T22:00' },
|
{ key: 'endAt', label: '종료 일시', type: 'datetime-local' },
|
||||||
{ key: 'dailyStart', label: '일일 시작(HH:mm)', placeholder: '09:00' },
|
{ key: 'dailyStart', label: '일일 시작 시각', type: 'time' },
|
||||||
{ key: 'dailyEnd', label: '일일 종료(HH:mm)', placeholder: '22:00' },
|
{ key: 'dailyEnd', label: '일일 종료 시각', type: 'time' },
|
||||||
{ key: 'priority', label: '우선순위(1~10)', type: 'number' },
|
{ key: 'priority', label: '우선순위(1~10)', type: 'number' },
|
||||||
{ key: 'status', label: '상태', type: 'select', opts: STATUS },
|
{ key: 'status', label: '상태', type: 'select', opts: STATUS },
|
||||||
]}
|
]}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user