DateField.GetValue()

  1. #1

    DateField.GetValue()

    Hello everyone, first I'm sorry if this post was duplicated, I looked and I did not find it.


    I'm trying to capture a date, but the format as it comes is giving me a headache:
    <ext:DateField runat="server" FieldLabel="Vencimento" ID="txtVencimento" Format="dd/MM/yy" LabelWidth="120" LabelAlign="Top"/>
    
    <ext:Button ...
         <Listeners>
             <Click Handler="parent.App.direct.addFinanceiro(App.txtVencimento.getValue());" />
    The result is, for example: "2013-05-15T17:23:53.027-03:00"


    I tried to use: Ext.util ..., Ext.Date ..., as I read in some posts, but I did not find the correct class.

    Can someone give me a solution?
    I need to capture only the date: "15/05/2013" for example.

    Tanks.
  2. #2
    Hello, @oespiao! Welcome to Ext.NET Forums!

    The value returned by a datefield's getValue() method is a JavaScript Date object instance.

    But if all you need is the string value in the field, you can just use its getRawValue() method.

    Hope this helps!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Perfect, thanks

Similar Threads

  1. getValue problem in js
    By samsaertug in forum 2.x Help
    Replies: 1
    Last Post: Mar 26, 2013, 11:00 PM
  2. [CLOSED] App.txtUserName.getValue()
    By imaa in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Jan 23, 2013, 9:26 AM
  3. [CLOSED] Combobox getValue
    By jthompson in forum 1.x Legacy Premium Help
    Replies: 25
    Last Post: Jun 15, 2012, 11:14 AM
  4. [CLOSED] TextField.getValue()
    By supera in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Jan 24, 2012, 1:17 PM
  5. Format datefield getValue
    By Tbaseflug in forum 1.x Help
    Replies: 1
    Last Post: Oct 21, 2011, 1:23 AM

Posting Permissions