We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Can we have views options in dropdown.

let's take example we have different views in scheduler like Day,Week,Month Views.So can we this Day,Week,Month options in Dropdown??

7 Replies

HB Hareesh Balasubramanian Syncfusion Team October 31, 2019 01:51 PM UTC

Hi Sudhanshu, 

Greetings from Syncfusion Support. 

Based on the requirement we have prepared a sample using actionBegin and actionComplete events and the same can be viewed from the below link, 

  onActionBegin(args) { 
    if (args.requestType === "toolbarItemRendering") { 
      let userIconItem = { template: '<input type="text" tabindex="1" id="dropdown" />', type: 'Input' } 
      args.items.push(userIconItem); 
    } 
  } 
  onActionComplete(args) { 
    let dropdowns = this.scheduleObj.element.querySelector('#dropdown'); 
    if (args.requestType === 'toolBarItemRendered') { 
      let dropdown = new DropDownList({ 
        popupHeight: '200px', 
        value: 'Week', 
        change: function (event) { 
          var view = document.querySelector(".e-schedule").ej2_instances[0]; 
          view.currentView = event.value; 
        }, 
        fields: { text: 'text', value: 'value' }, 
        dataSource: [ 
          { text: 'Day', value: 'Day' }, 
          { text: 'Week', value: 'Week' }, 
          { text: 'WorkWeek', value: 'WorkWeek' }, 
          { text: 'Month', value: 'Month' } 
        ] 
      }); 
      dropdown.appendTo(dropdowns); 
    } 
  } 

Kindly check the above sample and revert us if you have any further assistance. 
 
Regards,  
Hareesh 



SJ Sudhanshu Jain November 4, 2019 11:10 AM UTC

Above Solution is not working .Can you suggest another .



SJ Sudhanshu Jain November 8, 2019 11:41 AM UTC

Can we have Calendar selection component of scheduler in custom component .
Can we have different views in scheduler like Day,Week,Month Views in dropdown, and this dropdown will be sit in custom component .By this custom component we can perform same action which was available on scheduler .Please find requirement screen shot below .




HB Hareesh Balasubramanian Syncfusion Team November 13, 2019 12:51 AM UTC

Hi Sudhanshu, 

Thanks for being patience. 

Based on your requirement, we have prepared a sample using CustomClassComponent and the same can be viewed from the following link, 

Kindly try the above sample, if you have any concerns please revert us back for further assistance. 

Regards, 
Hareesh 




AM Amatressa March 21, 2020 06:06 PM UTC

Thanks
That is great .



.




VM Vengatesh Maniraj Syncfusion Team replied to Amatressa March 23, 2020 05:39 AM UTC

Thanks
That is great .



.



Hi Amatressa,

 

Thanks for the update.

 

You are most welcome.

 

Regards,

Vengatesh 


Loader.
Live Chat Icon For mobile
Up arrow icon