EventDates in Widget Template

Posted by Community Admin on 05-Aug-2018 21:25

EventDates in Widget Template

All Replies

Posted by Community Admin on 24-Feb-2011 00:00

Hi all,

I'm sure this is easy(ish) but I'm not seeing it. I'm working on the full item template for events, and there is a FieldListView to display the date range of an event. I want to change it to a more verbose format, but by magic or some such, this particular FieldListView doesn't have any properties or text accessed.

The current format is "1 - 1 Mar, 2011", which doesn't include the time part and is important to my users. How would one achieve:

1. "March 1, 2011 6:00 PM - March 1, 2011 9:00 PM"
2. "March 1, 2011 6:00 PM" (if no end date is available)

And for truly pie in the sky:

3. "March 1, 2011 6:00 PM - 9:00 PM" (leave out the date part of the end date if it matches the begin date)

Posted by Community Admin on 25-Feb-2011 00:00

Hi Zak,

The control has a public property Format that you can use. Example : EventStart.ToLocal():dd MMM, yyyy

All the best,
Ivan Dimitrov
the Telerik team

This thread is closed