# Component/TimePicker > Props: component-timepicker.props.txt ## Examples ### Base ```tsx { render: args => { const [value, setValue] = useState(); const handleChange = (newValue: Date | null) => { setValue(newValue); }; return {args.hasOwnProperty('incrementMinute') && incrementMinute: {args.incrementMinute}배수 단위로 분 설정} ; } } ``` ### Disabled ```tsx { render: args => { const [value, setValue] = useState(); const handleChange = (newValue: Date | null) => { setValue(newValue); }; return {args.hasOwnProperty('incrementMinute') && incrementMinute: {args.incrementMinute}배수 단위로 분 설정} ; }, render: args => { const [value, setValue] = useState(); const [value2, setValue2] = useState(); const [value3, setValue3] = useState(new Date()); const [value4, setValue4] = useState(); const [value5, setValue5] = useState(set(new Date(), { minutes: 10 })); const disabledTime = (current: Date | null) => { return { disabledHours: () => Array.from(Array(current?.getHours() ?? 0), (_, i) => i), disabledMinutes: () => Array.from(Array(current?.getMinutes() ?? 0), (_, i) => i) }; }; return TimePicker 전체 Disabled setValue(time)} disabled /> TimePicker 시간/분 Disabled setValue2(time ?? undefined)} disabledTime={disabledTime} /> TimePicker 시간/분 Disabled + hideDisabledMinutes setValue2(time ?? undefined)} disabledTime={disabledTime} hideDisabledMinutes /> TimePicker 시간/분 Disabled + 선택 불가능한 시간이 선택할 경우 setValue3(time)} disabledTime={disabledTime} /> TimePicker 시간/분 Disabled + incrementMinute setValue4(time)} disabledTime={disabledTime} incrementMinute={10} /> TimePicker 시간/분 Disabled + 선택 불가능한 시간이 선택할 경우 + incrementMinute setValue5(time)} disabledTime={() => { return { disabledMinutes: () => [0, 10, 20] }; }} incrementMinute={10} /> ; } } ``` ### Error ```tsx { render: args => { const [value, setValue] = useState(); const handleChange = (newValue: Date | null) => { setValue(newValue); }; return {args.hasOwnProperty('incrementMinute') && incrementMinute: {args.incrementMinute}배수 단위로 분 설정} ; }, args: { error: true } } ``` ### Full Width ```tsx { render: args => { const [value, setValue] = useState(); const handleChange = (newValue: Date | null) => { setValue(newValue); }; return {args.hasOwnProperty('incrementMinute') && incrementMinute: {args.incrementMinute}배수 단위로 분 설정} ; }, args: { fill: true } } ``` ### Increment Minute ```tsx { render: args => { const [value, setValue] = useState(); const handleChange = (newValue: Date | null) => { setValue(newValue); }; return {args.hasOwnProperty('incrementMinute') && incrementMinute: {args.incrementMinute}배수 단위로 분 설정} ; }, args: { incrementMinute: 5 } } ``` ### Mobile displayMode='bottomSheet'일 때 Input을 누르면 BottomSheet가 열리고, 시/분을 SelectChip 행으로 선택합니다. 시(또는 분)만 선택하면 반대 축이 자동으로 채워져 확인 버튼이 활성화됩니다(데스크탑과 동일). ```tsx { render: args => { const [value, setValue] = useState(); const handleChange = (newValue: Date | null) => { setValue(newValue); }; return {args.hasOwnProperty('incrementMinute') && incrementMinute: {args.incrementMinute}배수 단위로 분 설정} ; }, args: { displayMode: 'bottomSheet' }, parameters: { docs: { description: { story: "displayMode='bottomSheet'일 때 Input을 누르면 BottomSheet가 열리고, 시/분을 SelectChip 행으로 선택합니다. 시(또는 분)만 선택하면 반대 축이 자동으로 채워져 확인 버튼이 활성화됩니다(데스크탑과 동일)." } } } } ``` ### Mobile With Remove Button ```tsx { render: args => { const [value, setValue] = useState(); const handleChange = (newValue: Date | null) => { setValue(newValue); }; return {args.hasOwnProperty('incrementMinute') && incrementMinute: {args.incrementMinute}배수 단위로 분 설정} ; }, args: { displayMode: 'bottomSheet', showRemoveButton: true } } ``` ### Show Remove Button ```tsx { render: args => { const [value, setValue] = useState(); const handleChange = (newValue: Date | null) => { setValue(newValue); }; return {args.hasOwnProperty('incrementMinute') && incrementMinute: {args.incrementMinute}배수 단위로 분 설정} ; }, args: { showRemoveButton: true } } ``` ### Size ```tsx { render: args => { const [value, setValue] = useState(); const handleChange = (newValue: Date | null) => { setValue(newValue); }; return ; } } ```