Adding name of the day by the date on the calendar view - day view.

The date on the calendar day view is displayed in format MMM dd, yyyy as shown below (as highlighted).
I want to change it to show the name of the day, so something like "Thu Oct 25, 2018".
How can I customize it to make it possible?



3 Replies

KK Karthigeyan Krishnamurthi Syncfusion Team October 26, 2018 09:07 AM UTC

 
Thank you for contacting Syncfusion  
 
We have prepared the below sample to customize the header bar date format using Create and ActionComplete events as shown below. 
 
.ScheduleClientSideEvents(f=>f.Create("onCreate").ActionComplete("onComplete")) 
 
function onCreate() { 
            var schArgs = $("#Schedule1").ejSchedule("instance"); 
            if (schArgs.currentView() == "day") { 
                var options = { weekday: 'short', year: 'numeric', month: 'short', day: 'numeric' }; 
                var date = schArgs.currentDate().toLocaleDateString("en-US", options) 
                $(".e-datedisplay").text(date); 
            } 
        } 
 
        function onComplete(args) { 
            if (args.data.currentView == "day" && (args.requestType == "dateNavigate" || args.requestType == "viewNavigate")) { 
                onCreate(); 
            } 
        } 
 
Note: Above sample is prepared to customize the date format only for Day view. 
 
Regards, 
Karthigeyan 



AJ Andrew Jang October 29, 2018 10:25 PM UTC

This solution works like magic, thank you!



KK Karthigeyan Krishnamurthi Syncfusion Team October 30, 2018 04:07 AM UTC

 
We are happy that our solution fulfilled your requirement. 
 
Regards, 
Karthigeyan 
 


Loader.
Up arrow icon