Results 1 to 5 of 5

Thread: allow invalid dates in datefield

  1. #1

    Default allow invalid dates in datefield

    Hi,
    What would be a possible way of adding invalid date such as 2008-02-00 to datefield?

    Thanks.

  2. #2
    Sencha Premium User
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,258

    Default

    Maybe you could try turning off validation? Not sure this would work.

    Out of interest, what are you trying to achieve?

  3. #3

    Default

    Users sometimes needs to enter dates but don't know the exact day so I have to be able to write something such as 00-12-2008 or even 00-00-2008.

    Mysql accept those kind of dates.

    What I did was override many methods of Datefield ( such as validateValue). Unfortunatly, it does work as intended and doesn't break the calendar ( At least from what I saw) but is coded really bad.

    When I load my store in my form I do it with the "setValues" method. It all works well beside for my datefield.... I have to do setRawValue on it or else it becomes empty when the date is invalid ( Even if I override the validate method).

  4. #4

    Default

    BTW

    How do you turn of validation for only a field?

    Thanks

  5. #5

    Join Date
    Aug 2007
    Location
    Romania
    Posts
    42

    Default

    i think
    validateOnBlur:false
    would do the trick for you. Try it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •