1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Localizing dates in News Comments

Localizing dates in News Comments

2 posts, 0 answered
  1. Dmitry Sadakov
    Dmitry Sadakov avatar
    2 posts
    Registered:
    28 Dec 2007
    02 Apr 2009
    Link to this post
    Hi,
    Is there a way to change the date format in Comments for News items? 

    Right now it's hardcoded inside the CreateChildControls method of Telerik.Cms.Engine.WebControls.CommentItem, like this:

    creationDate.ToString("d MMM, hh:mm tt"))

    And I need to make it a "d MMM HH:mm". I believe this is impossible in the current Sitefinity 3.6?

    Thanks for the product, 
    Dmitri
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    03 Apr 2009
    Link to this post
    Hello Dmitry Sadakov,

    I saw that the container is private, which means that it cannot be overridden. We will fix this for the upcoming SP. The hardcoded HtmlGenericControl CommentDate will be removed. We will add DataTimeLiteral control in the template. This control has property that will allow you to set the date time format.

    I hope this helps.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
2 posts, 0 answered