[CLOSED] Date picker mindate bug?

  1. #1

    [CLOSED] Date picker mindate bug?



    Hi
    If the mindate is the same as the selected date, there is a box that says that the date must be greater then this mindate. but if the selected date is +1 day, the min date is selectable. I think there is some logic error here.
    Please try this example
    /Mikael


    <%@ 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">
    <title></title>
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            DateField1.MinDate = DateTime.Now;
            DateField1.SelectedDate = DateTime.Now;
        }
    </script>
    
    
    <script type="text/javascript">
        
    </script>
    </head>
    <body>
    <form id="form1" runat="server">
        <ext:ScriptManager ID="ScriptManager1" runat="server" InitScriptMode="Inline">    </ext:ScriptManager>
        <ext:DateField runat="server" ID="DateField1"></ext:DateField>
    
    
    </form>
    </body>
    </html>
  2. #2

    RE: [CLOSED] Date picker mindate bug?

    Hi Mikael,

    Just DateTime.Now give date with time. Try to set MinDate without time


    DateField1.MinDate = DateTime.Now.Date;*
  3. #3

    RE: [CLOSED] Date picker mindate bug?

    Yes that works. Thanks!
  4. #4

    RE: [CLOSED] Date picker mindate bug?

    Hi Mikael,

    This was actually a defect in the MinDate and MaxDate properties.*


    We're changing how both properties work so that you can set either with DateTime.Now and not have to worry about using just the "date" portion.*


    The fix should be committed momentarily.


    Geoffrey McGill
    Founder
  5. #5

    RE: [CLOSED] Date picker mindate bug?

    Thanks guys!

    /Mikael

Similar Threads

  1. Replies: 3
    Last Post: May 09, 2012, 4:28 PM
  2. [CLOSED] Hiding a date picker
    By jeremyl in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jul 28, 2011, 10:16 AM
  3. [CLOSED] Date picker BUG
    By FpNetWorth in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Dec 08, 2010, 2:19 PM
  4. [CLOSED] Date Picker
    By Raynald_Fontaine in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 09, 2010, 8:35 PM
  5. Replies: 3
    Last Post: May 06, 2010, 12:48 PM

Posting Permissions