- Home
- Forum
- React - EJ 2
- Failed
Failed
Hello, I have a problem with setting up the editor window.
When you try to edit, add, or simply open for editing and any other actions, the error Failed to execute 'closest' on 'Element': '.' appears in the editing window. is not a valid selector.
Dear Customer,
Sample: https://stackblitz.com/edit/react-scheduler-closestelement-issue-p6b21t?file=index.js
Based on your query and the shared codes, we have identified that you missed the name attribute for the text-box component used for the email field in the editor template. The name attribute is required when providing the e-field class. Please try the above solution and reach out to us if you need any further assistance.
[index.js]
|
const editorTemplate = (props) => { console.log("Editor template rendering", props); return (props !== undefined ? <table className='custom-event-editor'> <tbody> <tr> <td className='e-textlabel'>Name</td> <td colSpan={4}>
<input id='name' type="text" className='e-field e-input' name='name' placeholder='Enter name' /> </td> </tr> <tr> <td className='e-textlabel'>Last name</td> <td colSpan={4}> <input id='lastName' type="text" className='e-field e-input' name='lastName' placeholder='Enter last name' /> </td> </tr> <tr> <td className="e-textlabel">Email</td> <td colSpan={4}> <input id='id' type="text" className='e-field e-input' placeholder='Enter email' name='email' /> </td> </tr> <tr> <td className='e-textlabel'>Phone number</td> <td colSpan={4}> <input id='phone' type="text" className='e-field e-input' name='phone' placeholder='Enter your phone number' /> </td> </tr> <tr> <td className="e-textlabel">From</td> <td colSpan={4}> <DateTimePickerComponent format='dd/MM/yy hh:mm a' id='StartTime' date-name='StartTime' value={new Date(props.startTime || props.StartTime)} className='e-field' /> </td> </tr> <tr> <td className="e-textlabel">To</td> <td colSpan={4}> <DateTimePickerComponent format='dd/MM/yy hh:mm a' id='EndTime' date-name='EndTime' value={new Date(props.endTime || props.EndTime)} className='e-field' /> </td> </tr> <tr> <td className="e-textlabel">Description</td> <td> <textarea id='Description' cols='50' rows='3' maxLength={100} className='e-field e-input' name='Description' /> </td> </tr> </tbody> </table> : <div></div>) }
|
Regards,
Venkatesh
- 1 Reply
- 2 Participants
-
?? ?????? ???????
- Feb 27, 2024 11:05 PM UTC
- Feb 28, 2024 04:28 PM UTC