record field date

  1. #1

    record field date

    hi there i have this record field in my store

    <ext:RecordField Name="accountexpirydate" Type="Date" DateFormat="MMM d, yyyy"  />
    but i can't seem to get the value using record.get("accountexpirydate"), its returning as undefined.
  2. #2

    RE: record field date

    Hi,

    Do you have date with such format?
    Please show how looks 'accountexpirydate' field?


    DateFormat of RecordField is using if you have string which is date with concrete format
  3. #3

    RE: record field date

    if i remove the format and dateformat property in the record field, this is how it looks like from the DB

    2009-09-16T00:00:00

    although it is still not being shown in the ext:DateField that i have

    <ext:DateField ID="exttxtAccountExpiration" runat="server" FieldLabel="Account Expiration" Width="180" Format="MMM d, yyyy"  >
    </ext:DateField>
  4. #4

    RE: record field date

    Hi,

    How is related the store and datefield?


    If need to change represantation in grid then use renderer
  5. #5

    RE: record field date

    after i bind the store on page load, i assign value to the date field using the store value by

    Ext.getCmp("exttxtAccountExpiration").setValue(rec ord.get("accountexpirydate"));

    but it is not showing up
  6. #6

    RE: record field date

    Hi,

    Please show example
  7. #7

    RE: record field date

    ok, i finally got it to work, i changed the record field to

    <ext:RecordField Name="accountexpirydate" Type="Date" />
    and the client side value assignment to

            var expirydt = new Date(record.get("accountexpirydate"));
            Ext.getCmp("exttxtAccountExpiration").setValue(expirydt);
    its now getting the date and the format is correct as well

Similar Threads

  1. Replies: 2
    Last Post: Jan 23, 2012, 10:49 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. [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
  4. [1.0] DataStore Record Field Bug
    By protactinium in forum 1.x Help
    Replies: 1
    Last Post: May 17, 2010, 7:07 PM
  5. Replies: 0
    Last Post: Apr 27, 2010, 9:09 PM

Posting Permissions