Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jakob Dahl 2 posts 71 karma points
    Dec 29, 2023 @ 14:48
    Jakob Dahl
    0

    Date format on article lists

    It took me some time to figure out, but if anybody has the same problem as me here is one way to do it. The American date format is not always practical and I found a way to set the format in the dictionary. Create a dictionary item Article.OnDateFormat and change line 45 in partial view latestArticlesRow.cshtml to

    @Umbraco.GetDictionaryValue("Article.On") @article.ArticleDate.ToString(@Umbraco.GetDictionaryValue("Article.OnDateFormat"))
    

    Then it is possible to have all the date formats needed

  • Paul Seal 524 posts 2890 karma points MVP 7x c-trib
    Dec 31, 2023 @ 14:08
    Paul Seal
    0

    Hi thanks for sharing this. I will add it to the starter kit for newer versions to benefit from it.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies