Problem with disable dates, when using culture setting

  1. #1

    Problem with disable dates, when using culture setting



    Hi I cant get this simple sample code to work. Any ideas?

    <%@ Page Language="C#" %>
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
    
    
    
    <script type="text/javascript">
    
    
    </script>
    
    
    
    <title></title>
    
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            //Sets the culture on the page
            string strCulture = "da-DK";
            Page.Culture = strCulture;
            System.Globalization.CultureInfo ciCulture = new System.Globalization.CultureInfo(strCulture, true);
            ScriptManager1.Locale = ciCulture;
            //--
    
    
            string[] strDisabledDates = new string[1];
            strDisabledDates[0] = DateTime.Now.AddDays(1).ToShortDateString();
            dpDatePicker.DisabledDates = strDisabledDates;  
        }
    
    
    </script>
    </head>
    <body>
    <form id="form1" runat="server">
    
    
    <ext:ScriptManager ID="ScriptManager1" runat="server">
    </ext:ScriptManager>
    
    
    
        <ext:DatePicker runat="server" ID="dpDatePicker"></ext:DatePicker>
    
    
    </form>
    </body>
    </html>
    Thanks!
    /Mikael
  2. #2

    RE: Problem with disable dates, when using culture setting

    Hi guys, do you need more info on this one? Maybe I was beeing unclear?

    /Mikael
  3. #3

    RE: Problem with disable dates, when using culture setting

    Hi Mikael,

    We will investigate it, it seems need make some changes.
    At this moment use for "da-DK" culture


    strDisabledDates[0] = DateTime.Now.AddDays(1).ToString("dd/MM/yy", CultureInfo.InvariantCulture);
    *
  4. #4

    RE: Problem with disable dates, when using culture setting

    Ok thank vladimir.
    Keep me posted, when the changes has been made.

    /Mikael
  5. #5

    RE: Problem with disable dates, when using culture setting

    Hi Mikael,

    We're making some changes to the .DisabledDates property, which should be implemented today.*


    Geoffrey McGill
    Founder
  6. #6

    RE: Problem with disable dates, when using culture setting



    Excellent! Thank you!

    /Mikael

Similar Threads

  1. How to disable dates in calendar
    By adrdomeniconi in forum 2.x Help
    Replies: 0
    Last Post: Apr 16, 2012, 11:55 AM
  2. [CLOSED] How to disable all dates before today.
    By farisqadadeh in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 19, 2011, 9:46 AM
  3. Replies: 4
    Last Post: Apr 15, 2011, 3:53 PM
  4. [CLOSED] Disable specific dates and ranges in the DateField control
    By jmcantrell in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jul 23, 2010, 5:56 PM
  5. [CLOSED] SelectedDate not working when setting culture
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Mar 24, 2009, 10:54 AM

Posting Permissions