견적서 견적일 필드 지울때 에러 처리

This commit is contained in:
basssy 2024-12-09 14:27:39 +09:00
parent ffc770f2dc
commit 396d01f288

View File

@ -177,10 +177,15 @@ export default function Estimate({ params }) {
// set // set
useEffect(() => { useEffect(() => {
let estimateDate = dayjs(startDate).format('YYYY-MM-DD') let estimateDate
if (startDate) {
estimateDate = dayjs(startDate).format('YYYY-MM-DD')
if (begin === 1) { if (begin === 1) {
setEstimateContextState({ estimateDate: estimateDate }) setEstimateContextState({ estimateDate: estimateDate })
} }
} else {
setEstimateContextState({ estimateDate: '' })
}
}, [startDate]) }, [startDate])
useEffect(() => { useEffect(() => {