score:0

depends in on what do you want to edit/delete, here is my example:

  const booleditor = (props) => {
    return null;
  };
  const labelcomponent = (props) => {
    if (props.text === 'details') {
      return <appointmentform.label
      { ...props} 
      text="precio modulo"
      />  
    } else if (props.text === 'more information') {
      return null
    } else if (props.text === '-') {
      return <appointmentform.label
      { ...props}
      />  
    }
  };
  const inputcomponent = (props) => {
    if (props.type === 'titletexteditor') {
      return <appointmentform.texteditor
      { ...props}
      type='numbereditor'
      placeholder='precio'
      />
    }
  };

  // cambio el layout
  const basiclayout = ({ onfieldchange, appointmentdata, ...restprops }) => {
    return (
      <appointmentform.basiclayout
        appointmentdata={appointmentdata}
        onfieldchange={onfieldchange}
        {...restprops}   
      >
      </appointmentform.basiclayout>
    );
  };

  // retorno el calendario 
  return (
    <>
    <h1 style={{ 'textalign': 'center' }}>horario del profesor:</h1>
        <paper>
        <scheduler
          data={schedulerdata}
        >

          <viewstate
            defaultcurrentdate={currentdate}
            defaultcurrentviewname="week"
          />

          <editingstate
            oncommitchanges={commitchanges}
          />
          <integratedediting />

          <dayview
            startdayhour={7}
            enddayhour={23}
          />
          <weekview startdayhour={7} enddayhour={23} />

          <toolbar />
          <datenavigator />
          <todaybutton />
          <viewswitcher />
          <confirmationdialog />
          <appointments />
          <appointmenttooltip
            showclosebutton
            showopenbutton
          />
          <appointmentform
            readonly={isnormaluser}
            basiclayoutcomponent={basiclayout}
            booleaneditorcomponent={booleditor}
            labelcomponent={labelcomponent}
            texteditorcomponent={inputcomponent}
          />
        </scheduler>
      </paper>
      <br />
      <br />
      </>
  )

Related Query

More Query from same tag