fix: on press widgets select functionality trigger issue in mobile view

This commit is contained in:
RaktimaNXG
2024-01-31 09:56:46 +05:30
parent 882b97da5e
commit 0a3d89d0e2
2 changed files with 13 additions and 2 deletions
@@ -9,6 +9,13 @@ function PlaceholderType(props) {
props.setDraggingEnabled(true);
};
// const formatDate = (dateString) => {
// const date = new Date(dateString);
// const updateDate = date.toLocaleDateString('en-US', { month: 'long', day: 'numeric', year: 'numeric' })
// console.log("update",updateDate)
// return updateDate;
// };
useEffect(() => {
const senderUser = localStorage.getItem(`Extand_Class`);
const jsonSender = JSON.parse(senderUser);
@@ -298,7 +305,8 @@ function PlaceholderType(props) {
type="date"
disabled={props.isPlaceholder ? true : false}
onBlur={handleInputBlur}
value={props.selectDate && props.selectDate}
// value={props.selectDate && formatDate(props.selectDate)}
// value={props.selectDate && props.selectDate}
onChange={(e) => {
props.setSelectDate(e.target.value);
onChangeInput(
@@ -245,7 +245,10 @@ export const getWidgetType = (
"0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.18)",
marginLeft: marginLeft && `${marginLeft}px`,
background:
selectWidgetType === item.type && backgroundColor && backgroundColor
selectWidgetType === item.type &&
backgroundColor &&
backgroundColor,
userSelect: "none"
}}
>
<div