How to disable the date navigation keys and date selection calendar appearing at the top left in the header

Schedule.png 

I am using Syncfusion Schedule component. I need to diable the date navigation keys and date selection calendar appearing at the top left in the header. How can I do it ?



3 Replies

AK Ashokkumar Karuppasamy Syncfusion Team December 14, 2023 02:28 PM UTC

Hi Ravi,


You can fulfill your schedule requirements by utilizing the actionBegin event. Through this event, you can either remove any schedule toolbar items that are not needed. Additionally, overwrite the style of schedule toolbar items to set them as display: none, meeting your requirements. The attached sample below demonstrates the solution. Please give it a try and let us know if you need any further assistance.


Sample: https://stackblitz.com/edit/schedule-toolbar-remove-euslqc?file=index.js,index.css

[index.js]

    const onActionBegin = (args=> {

      if (args.requestType === 'toolbarItemRendering') {

          args.items = args.items.slice(3);

      }

    };

    return (<div className='schedule-control-section'>

      <div className='col-lg-9 control-section'>

        <div className='control-wrapper'>

          <ScheduleComponent width='100%' height='650px' ref={scheduleObj} selectedDate={new Date(2021115)} actionBegin={onActionBegin} eventSettings={dataSource: data }}>

            <ViewsDirective>

              <ViewDirective option='Day'/>

              <ViewDirective option='Week'/>

              <ViewDirective option='WorkWeek'/>

              <ViewDirective option='Month'/>

            </ViewsDirective>

            <Inject services={[DayWeekWorkWeekMonthResizeDragAndDrop]}/>

          </ScheduleComponent>

 


(OR)

[index.css]

.e-schedule .e-schedule-toolbar .e-toolbar-items .e-toolbar-left {

  displaynone !important;

}

 



Regards,
Ashok



RA Ravi replied to Ashokkumar Karuppasamy December 14, 2023 04:36 PM UTC

Thanks Ashok...Will try it and reach out if I need any further help.



SK Satheesh Kumar Balasubramanian Syncfusion Team December 15, 2023 02:36 PM UTC

You're welcome! Don't hesitate to reach out if you have any more questions or need further assistance.


Loader.
Up arrow icon