Parse number of month to string name

2 posts, 0 answers
  1. alex
    alex avatar
    17 posts
    Member since:
    Nov 2020

    Posted 07 Jan Link to this post

    how can i display month names without converting each month number via a function

    this is my kendo grid with month column:

    <kendo-grid-column field="month">
            <ng-template kendoGridCellTemplate let-dataItem="dataItem">

    the function convertMonthNToName contains a switch that returns a string month name

    Is there anything kendo preset that does this? via a parse or via culture libraries





  2. Martin
    Martin avatar
    282 posts

    Posted 11 Jan Link to this post

    Hi Alex,

    Thank you for the provided code snippet.

    In case the convertMonthNToName function receives a plain number, the most straight forward approach is to create an array with month names, and based on the number, to extract the right one, e.g.:

     <kendo-grid-column field="ProductID" title="ID" width="100">
            <ng-template kendoGridCellTemplate let-dataItem="dataItem">
              <span>{{ monthNames[dataItem.ProductID] }}</span>
      public monthNames = [

    However please check the following article related to build-in date/number parsing and formating options:

    I hope this helps.

    Progress Telerik

    Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at

Back to Top