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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to show the week number as text?

Thread ID:

Created:

Updated:

Platform:

Replies:

150824 Jan 21,2020 11:48 AM UTC Jan 23,2020 06:43 AM UTC Angular - EJ 2 3
loading
Tags: Schedule
Rasmus
Asked On January 21, 2020 11:48 AM UTC

Now the week number displays like "4" can i somehow get it to show "Week 4" (See the pictures for example, i just edited the html to show what i need).

Attachment: pictures_b3d029d4.rar

Vengatesh Maniraj [Syncfusion]
Replied On January 22, 2020 07:16 AM UTC

Hi Rasmus, 

Greetings from Syncfusion Support. 

Based on the requirement, we have prepared the below sample for week number template by making use of renderCell event like below, 

onRenderCell(args):void{ 
      if (args.elementType === 'emptyCells') { 
            let weekNumber = args.element.querySelector('.e-week-number span').innerText; 
            args.element.querySelector('.e-week-number span').innerText = "Week "+ weekNumber; 
        } 
    } 




Kindly try the above sample and revert us for further assistance. 

Regards, 
Vengatesh 


Rasmus
Replied On January 22, 2020 09:18 AM UTC

Thank you for the help! It works great!

Vengatesh Maniraj [Syncfusion]
Replied On January 23, 2020 06:43 AM UTC

Hi Rasmus, 

Thanks for the update. 

We are glad that your requirement has fulfilled. 

Regards, 
Vengatesh 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon