D Collins asked on February 26, 2014 12:35

I'm looking at using the CMS Calendar and event booking system to put a little "Important Dates" gadget on my intranet. I'm not looking for users to book events, I'm simply looking to post dates to remind them. (eg. Oct 31: Hallowe'en, Aug 4: Company Picnic, etc.).

I've been copying the calendar from the corp site example. I don't want the whole calendar, just the events summary. Here's my transform:

<tr class="Event">
<td class='event-date'>
  <%# GetEventDateString(FormatDateTime(Eval("EventDate"), "MMM d"),FormatDateTime(Eval("EventEndDate"), "MMM d"),Eval<bool>("EventAllDay")) %>
<td class='event-name'>
  <a href="<%# GetDocumentUrl() %>">
    <%# Eval("EventName", true) %>

I'm having trouble with a couple of things, in decreasing order of need:

  • formatting the date string to MMM d. I don't find any documentation on GetEventDateString(). The FormatDateTime I have above is just ignored, and it displays the standard M/dd/yyyy hh:mm AP
  • I'd like to page the events, so that I only see one month at a time, with a ' < ThisMonth > ' nav bar to go back and forth just like an actual calendar has.
  • not sure what to do with the EventEndDate and AllDay fields... maybe leave them out. Maybe leave Time out too.

(Wow, that bold is really bold...)

Recent Answers

D Collins answered on February 26, 2014 12:38

Oops. I didn't notice how sparse the subject line was until it was too late to edit. Should have been more like 'booking events list formatting'

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on February 27, 2014 01:47


  1. If you want to use just the Event data field, you can remove the GetEventDateString functions and use just this: <%# FormatDateTime(Eval("NewsReleaseDate"),"MMM d") %>

  2. This would require some customization. If I understand this correctly, the events will be displayed by some repeater and you want to restrict it to one month, right? In this case, you can add for example a query string to the URL with month value. Then, the repeater will read this query string using a macro in the WHERE condition and filter out events only for given month.

  3. I think it is answered in no.1 where you can simplify the date rendering.

Best regards,
Juraj Ondrus

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.