Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
200
Are Long Date and Short Date our only Date Format Options?
posted

When setting the date format for the WebDateChooser I only see "Long" and "Short" as acceptable values.

I want to show a short day name and a short date:  "Wed 01/16/08"

Is this possible with the webdatechooser?

Thanks for your help.

Parents
  • 24497
    posted

    Hi,

    The Format defines only date pattern for not-focused state. In input mode WebDateChooser can only use "digit" patterns, and only for all 3 fields (day, month, year).

    Both those patterns are defined by CurrentCulture or they can be customized on level of particular control. For example, set Format="Long" and implement Page.OnLoad by something like below:

    protected void Page_Load(object sender, EventArgs e)
    {
      System.Globalization.
    CultureInfo ci = System.Globalization.CultureInfo.CreateSpecificCulture("en-EN");
      ci.DateTimeFormat.LongDatePattern =
    "ddd MM/dd/yy";
      ci.DateTimeFormat.ShortDatePattern =
    "MM/dd/yy";
      
    this.WebDateChooser1.CalendarLayout.Culture = ci;
    }

    Regards,
    Viktor
    Infragistics web team

Reply Children
No Data