custom editor template

I tried to make a custom template for the schedule component. This is the example I am trying to follow.


https://ej2.syncfusion.com/react/demos/?utm_source=installer&utm_medium=listing&utm_campaign=controlpanel#/bootstrap5/schedule/editor-template

When I start the example in https://stackblitz.com, the subject and status does not show. I had the same problem in my code too.

Could you help to check if there's any version incompatibility?


Thanks.

Alan Zou


Attachment: Screenshot_20220910_134624_40e88030.rar

1 Reply

RV Ravikumar Venkatesan Syncfusion Team September 12, 2022 04:36 PM UTC

Hi Tingting,


Greetings from Syncfusion support.


We have validated your query “The subject and status does not show” at our end. You can resolve the problem by setting up the value property to the Subject and the Status field of the editorTemplate as highlighted in the below-shared code snippet.


Sample: https://stackblitz.com/edit/ej2-react-schedule-editor-template-set-subject-status?file=index.js


[index.js]

  editorTemplate(props) {

    return ((props !== undefined) ? <table className="custom-event-editor" style={width: '100%' }} cellPadding={5}><tbody>

      <tr><td className="e-textlabel">Summary</td><td colSpan={4}>

        <input id="Summary" className="e-field e-input" type="text" name="Subject" value={props.Subject} style={width: '100%' }} />

      </td></tr>

      <tr><td className="e-textlabel">Status</td><td colSpan={4}>

        <DropDownListComponent id="EventType" placeholder='Choose status' data-name='EventType' value={props.EventType} className="e-field" style={width: '100%' }} dataSource={['New''Requested''Confirmed']}>

        </DropDownListComponent>

      </td></tr>

      <tr><td className="e-textlabel">From</td><td colSpan={4}>

        <DateTimePickerComponent id="StartTime" format='dd/MM/yy hh:mm a' data-name="StartTime" value={new Date(props.startTime || props.StartTime)} className="e-field"></DateTimePickerComponent>

      </td></tr>

      <tr><td className="e-textlabel">To</td><td colSpan={4}>

        <DateTimePickerComponent id="EndTime" format='dd/MM/yy hh:mm a' data-name="EndTime" value={new Date(props.endTime || props.EndTime)} className="e-field"></DateTimePickerComponent>

      </td></tr>

    </tbody></table> : <div></div>);

  }


Kindly try the shared solution and let us know if you need any further assistance on this.


Regards,

Ravikumar Venkatesan


Loader.
Up arrow icon