Skip to content

Commit 53147ca

Browse files
fix: checkbox checked issue in signyour-self flow
1 parent 6004522 commit 53147ca

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

apps/OpenSign/src/components/pdf/Placeholder.js

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -90,20 +90,29 @@ function Placeholder(props) {
9090
const [isDraggingEnabled, setDraggingEnabled] = useState(true);
9191
const [isShowDateFormat, setIsShowDateFormat] = useState(false);
9292
const [selectDate, setSelectDate] = useState({
93-
date: moment(
94-
getDefaultdate(
95-
props?.pos?.options?.response,
96-
props.pos?.options?.validation?.format
97-
).getTime()
98-
).format(changeDateToMomentFormat(props.pos?.options?.validation?.format)),
99-
format: getDefaultFormat(props.pos?.options?.validation?.format)
93+
date:
94+
props.pos.type === "date"
95+
? moment(
96+
getDefaultdate(
97+
props?.pos?.options?.response,
98+
props.pos?.options?.validation?.format
99+
).getTime()
100+
).format(
101+
changeDateToMomentFormat(props.pos?.options?.validation?.format)
102+
)
103+
: "",
104+
format:
105+
props.pos.type === "date"
106+
? getDefaultFormat(props.pos?.options?.validation?.format)
107+
: ""
100108
});
101109
const [dateFormat, setDateFormat] = useState([]);
102110
const [startDate, setStartDate] = useState(
103-
getDefaultdate(
104-
props?.pos?.options?.response,
105-
props.pos?.options?.validation?.format
106-
)
111+
props.pos.type === "date" &&
112+
getDefaultdate(
113+
props?.pos?.options?.response,
114+
props.pos?.options?.validation?.format
115+
)
107116
);
108117
const dateFormatArr = [
109118
"L",
@@ -117,6 +126,7 @@ function Placeholder(props) {
117126
"DD MMMM, YYYY"
118127
];
119128

129+
useEffect(() => {}, []);
120130
//function change format array list with selected date and format
121131
const changeDateFormat = () => {
122132
const updateDate = [];

0 commit comments

Comments
 (0)