Setting scheduler dateFormat effecting header title in Month view

Setting dateFormat as below is causing current month title in month view to display today date using the dateFormat.
How can I set current month title to default format 'May 2021'?





1 Reply 1 reply marked as answer

PN Praveenkumar Narasimhanaidu Syncfusion Team May 28, 2021 01:04 PM UTC

Dear customer, 

Greetings from Syncfusion support..! 

We have validated your reported scenario “How can I set current month title to default format while using dateFormat ” at our end and let you know that you can achieve this requirement using scheduler’s dataBound event and below highlighted code snippet. We have also prepared a sample for your reference which can be viewed from following link. 
function onDataBound(args) { 
        var scheduleObj = document.querySelectorAll(".e-schedule")[0].ej2_instances[0]; 
        var instance = new ej.base.Internationalization(); 
        if (scheduleObj.currentView === "Month") { 
            var formatedText = instance.formatDate(scheduleObj.selectedDate, { skeleton: 'yMMM' }) 
            document.querySelector(".e-toolbar-item.e-date-range .e-tbar-btn .e-tbar-btn-text").textContent = formatedText; 
        } 
 
    } 

Kindly try the above solution and get back to us if you need any further assistance. 

Regards, 
Praveenkumar  


Marked as answer
Loader.
Up arrow icon