Widget Template: Event StartDate Format

Posted by Community Admin on 03-Aug-2018 20:25

Widget Template: Event StartDate Format

All Replies

Posted by Community Admin on 10-Apr-2011 00:00

What's the syntax in the widget templates to allow me to format the startdate to the following format

"MMM dd"

I see there's a DateField I can use but keeps throwing an exception on me

<sitefinity:TextField runat="server" DisplayMode="Read" Value='<%# Eval("EventStart") %>' Format="0:MMM dd" />


?

Posted by Community Admin on 11-Apr-2011 00:00

Hi Steve,

You can define the format for this field like this:

<sitefinity:TextField runat="server" DisplayMode="Read" Value='<%# Eval("EventStart", "0:dd MMM")%>' />

Inserting this can also achieve the desired functionality:
<br><strong>Event Start:</strong></br>
<sf:FieldListView ID="EventStartDate"runat="server"Format=" PublicationDate.ToLocal():  dd MMM"/>


Best wishes,
Boyan Barnev
the Telerik team

This thread is closed