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

Forums / 3.x Pre-release forums (retired) / News module format

News module format

6 posts, 0 answered
  1. Vangelis
    Vangelis avatar
    153 posts
    Registered:
    07 Jan 2006
    03 Mar 2007
    Link to this post

    Hello,


    Below is how news title and summary are displayed in edit mode

    this is my 2nd news itemthis is my 2nd news item summary

    on preview window this is how is is displayed. Is it possible to hide time and change date format in dd/mm/yyyy ?

    01/03/2007 00:00:00

    this is my 2nd news item

    this is my 2nd news item summary

    Best regards

    Vagelis

  2. Vangelis
    Vangelis avatar
    153 posts
    Registered:
    07 Jan 2006
    03 Mar 2007
    Link to this post
    Hello,

    It should be nicer and easier for visitors to understand if date and time format (selection of 12 or 24 with no seconds) would be displayed below news title or at least at the same row with different font size.

    Regards

    Vagelis
  3. Vangelis
    Vangelis avatar
    153 posts
    Registered:
    07 Jan 2006
    04 Mar 2007
    Link to this post
    I did the following change in newslist.ascx with the following and it worked.

            <!--<p class="newsdate"><%'# DataBinder.Eval(Container.DataItem, "Publication_Date") %></p>-->
            <p class="newsdate"><%#Eval("Publication_Date", "{0:dd/MM/yyyy}")%></p>    

    But it should be a general option in the project for date and time format.

    Best regards

    Vagelis
  4. Rebecca
    Rebecca avatar
    536 posts
    Registered:
    24 Sep 2012
    05 Mar 2007
    Link to this post
    Hi Vagelis,

    Thank you very much for your suggestion. We will definitely consider implementing more felexible ways to set date and time formats.

    Kind regards,
    Rebecca
    the telerik team
  5. Dennis
    Dennis avatar
    19 posts
    Registered:
    26 May 2009
    19 Oct 2010
    Link to this post
    Great tip Vangelis - your workaround works perfectly on the ListPageMaster.aspx file, where I added your snippet (slightly modified) to support Danish date format:

    <p class="sf_newsDate"><%#Eval("Publication_Date", "{0:d'. 'MMMM' 'yyyy}")%></p>

    Unfortunately it does not work on the ListPageDetail.aspx file.

    Do you also have a workaround for that?

    Regards, Dennis
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    19 Oct 2010
    Link to this post
    Hello Dennis,

    Eval works on the Master template because there we use repeater which is bind to a datasource of IContent objects. The Details mode contains just standard ASP.NET controls which values are set dynamically and no one of these controls is a bindable control where you can use Eval

    Options

    1. Override the ContentView control and its SetSingleItemContent
    2. Use the url rewrite data from the query string to get the item and set the values

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
6 posts, 0 answered