setting the default value of a date type column of store from backend ?

  1. #1

    setting the default value of a date type column of store from backend ?

    Hi
    How can I set the default value of a date type column of store from backend ? I am trying set the defaultValue of DateTime column to a value which is determined by some logic.

    <ext:Store ID="store1" runat="server">
            <Reader>
                <ext:JsonReader ReaderID="Id">
                    <Fields>
                        <ext:RecordField Name="field12" />
                        <ext:RecordField Name="dt"  Type="Date" DeafultValue="............."/>
                        <ext:RecordField Name="Id" />
                    </Fields>
                </ext:JsonReader>
            </Reader>
        </ext:Store>
  2. #2

    RE: setting the default value of a date type column of store from backend ?

    Any idea please ...?
  3. #3

    RE: setting the default value of a date type column of store from backend ?

    I don't really like how the DefaultValue property currently works and we're looking into changing the functionality for the v1.0 release.

    As a temp work-around, you can set a Date DefaultValue by using a JavaScript Date object.


    Example


    DefaultValue="new Date(2009, 1, 20)"

    Hope this helps.


    Geoffrey McGill
    Founder

Similar Threads

  1. [CLOSED] Default date format for Type="Date" RecordField
    By r_honey in forum 1.x Legacy Premium Help
    Replies: 12
    Last Post: May 29, 2012, 4:16 PM
  2. Default value for date type variable
    By emon in forum 1.x Help
    Replies: 10
    Last Post: Mar 10, 2011, 10:35 AM
  3. With regard to the date of the type stroe
    By guoweidong in forum 1.x Help
    Replies: 2
    Last Post: Mar 10, 2010, 1:05 AM
  4. RecordField type="date" in coolite 0.8
    By dperera in forum 1.x Help
    Replies: 8
    Last Post: Sep 01, 2009, 6:49 PM
  5. Replies: 5
    Last Post: Jan 27, 2009, 11:19 AM

Posting Permissions