Loading ...
Sorry, an error occurred while loading the content.

Re: DayNumberFormatting

Expand Messages
  • Peter
    Hi Gavin, There is no built-in way to do that. My javascript always inserts the date number itself into the Date cell, replacing the {0} token that comes
    Message 1 of 2 , Mar 19, 2011
    View Source
    • 0 Attachment
      Hi Gavin,

      There is no built-in way to do that. My javascript always inserts the date number itself into the Date cell, replacing the "{0}" token that comes from the DayCellFormatter.

      The only way I can think of doing this is:
      - Assign Calendar.DayCellFormatting = "{LABEL}"; (use HTML around the token to format it.)
      - Create a SpecialSingleDate object for each date and assign its Label property to the correctly formatted day of the month.
      - Make sure you load only one month into the calendar and use callbacks for each month change. See the topic "Minimizing how much data is sent to the browser" in the Date and Time users guide, around page 315.

      --- Peter Blum
      www.PeterBlum.com

      --- In PeterBlum@yahoogroups.com, "gavinokane" <gavinokane@...> wrote:
      >
      > Hi Peter,
      >
      > I'm using the Calendar control and want to display the number in the following format:
      >
      > 1st, 2nd, 3rd, 4th, etc
      >
      > it is currently displaying as just a number 1,2,3,4,5, etc
      >
      > I presume I should use the "DayCellFormatter-CustomFormatter-DayNumberFormatting" property but I'm not sure what to set it to. Is this documented anywhere?
      >
      > Thanks
      > Gavin
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.