Date Field Auto Complete?

  1. #1

    Date Field Auto Complete?

    I have this problem. I setup a datefield and set my format like this

    code.aspx

           <ext:DateField ID="DateField3" runat="server" Width="200" Format='YYYY-mm-dd'  InvalidText= "Invalid Format. YYYY-mm-dd" >                               
                                </ext:DateField>
    But the problem I have is when I enter an invalid date like 2009-10-45 and press tab it automatically fix the date to 2009-10-4

    And even worse when I enter something like 2009-50-50 and press tab I get some random date 7876-00-31 !!!

    Is there a way to truly parse the date? Im using C#.

    Im evaluating coolite for purchase and so far the coolite documentation and the few examples arent making the deal.
  2. #2

    RE: Date Field Auto Complete?

    Hi kowi,

    I you use a .NET DateTime format specifier you should get better results.

    Example

    <ext:DateField 
        ID="DateField3" 
        runat="server" 
        Width="200" 
        Format="yyyy-MM-dd"
        InvalidText= "Invalid Format. yyyy-MM-dd"
        />
    Hope this helps.

    Geoffrey McGill
    Founder
  3. #3

    RE: Date Field Auto Complete?

    Hi,

    Ty for the answer.

    The format really isnt the problem it works fine, the problem that bugs me is when I Introduce a date that is in range of the format(yyyy-MM-dd) like 2009-15-29 but not valid (since theres no month 15) it auto fix it to a random date. Is there a way to stop doing this ? Like just leave the error and the red line around the control + the tooltip saying format is wrong.

Similar Threads

  1. [CLOSED] Auto FieldLabel with static field width?
    By softmachine2011 in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Aug 01, 2012, 9:02 AM
  2. [CLOSED] Displaying Todays date in Date field
    By Vasudhaika in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Feb 22, 2011, 10:38 AM
  3. Replies: 0
    Last Post: Dec 29, 2010, 8:49 PM
  4. [CLOSED] How to Set Date Format in a Coolite Date Field
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 02, 2010, 8:47 AM
  5. Daterange in Date Field
    By genius2311 in forum 1.x Help
    Replies: 0
    Last Post: Aug 09, 2010, 4:56 AM

Posting Permissions