Results 1 to 3 of 3

Thread: How-to change initDate to be conformable to date value

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    4
    Vote Rating
    0
      0  

    Default How-to change initDate to be conformable to date value

    My TimeField on a form loaded with loadRecord method.
    But when the first change of the data occures date part of the value reset to 01/01/2008.

    Can I change initDate value, that it always be a date part of value that I load from record?

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,381
    Answers
    3997
    Vote Rating
    1536
      0  

    Default

    I'm not sure I understand what you mean by "date part of the value"
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    4
    Vote Rating
    0
      0  

    Default

    I'll try to explain the problem better.

    I have a simple form and TimeField component on it. test_timefield.zip
    Initialy value for TimeField loaded from record (some data.Model instance).
    Appropriate time value is displayed in the TimeField and after I press "submit" button form submit next value:
    2013-02-05 16:40:27
    Well, then I change time value and submit form again and unexpectedly get the next result:
    2008-01-01 01:00:00
    The time part of the value is right I have selected it, but Date part of the value have been reset to default value that TimeField component store in initialDate variable of the class.

    How I can avoid this problem?
    The form have been build on the assumption, that time value can be selected within particular date.

Tags for this Thread

Posting Permissions

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