Results 1 to 4 of 4

Thread: Timefield text dissapears

  1. #1

    Default Timefield text dissapears

    Hello!
    I've searched for a solution, but nobody seems to have this problem...
    The timefield combo appears perfectly, and if I select a field it looks like it's been selected, but when it looses the focus, the selected time dissapears.
    Can anybody help me, please?
    Thanks!!

    Code:
    var panel= new Ext.Panel({
                        title: 'Panel',
                        layout: 'table',
                        layoutConfig: {
                            columns: 4
                        },
                        items: [{
                                layout: 'form',
                                colspan: 2,
                                items: [{
                                    width:126,
                                    xtype: 'timefield',
                                    minValue: '07:00',
                                    maxValue: '22:00',
                                    increment: 5,
                                    format:'H:i',
                                    fieldLabel: 'Time',
                                    allowBlank:true,
                                    name: 'time'
                                }]
                         }]

  2. #2

    Question

    Hey did you manage to find a solution to this, I am having exactly the same problem..

  3. #3

    Default

    There are some important and peculiar points here:

    1. When you, say, update a record with JSON, then the host must return all of the field values that were updated. And furthermore, it must return those values in a (string) format which ExtJS will understand. If the value is missing, or it has been returned in a format that ExtJS cannot decode, then the "default value" will silently be substituted ... and this is usually a blank.
    2. To put this problem away for good, I found it necessary to extend the JsonStore component with additional code that checks for, e.g. date-fields and stuffs the necessary hooks and decoders into it. I also had to define a fairly hefty subroutine on the server side (ColdFusion 8) which all of the CRUD-datasource methods could reliably call. Only then, by fully controlling the behavior on both the client and the server side, did the behavior become reliable in-practice.

  4. #4

    Default

    Ahh but in my case I am not pulling any data at all into the TimeField, I am simply rendering the field to a FormPanel. I have also tried rendering this to different panels within my app and I get the same behaviour.

    Quote Originally Posted by Mike Robinson View Post
    There are some important and peculiar points here:

    1. When you, say, update a record with JSON, then the host must return all of the field values that were updated. And furthermore, it must return those values in a (string) format which ExtJS will understand. If the value is missing, or it has been returned in a format that ExtJS cannot decode, then the "default value" will silently be substituted ... and this is usually a blank.
    2. To put this problem away for good, I found it necessary to extend the JsonStore component with additional code that checks for, e.g. date-fields and stuffs the necessary hooks and decoders into it. I also had to define a fairly hefty subroutine on the server side (ColdFusion 8) which all of the CRUD-datasource methods could reliably call. Only then, by fully controlling the behavior on both the client and the server side, did the behavior become reliable in-practice.

Posting Permissions

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