1. #1
    Sencha User
    Join Date
    Sep 2011
    Location
    Bangalore
    Posts
    169
    Vote Rating
    0
    samarth is on a distinguished road

      0  

    Default Display only Current date in date field

    Display only Current date in date field


    Hello guys

    I am using Extjs 3. I have a window in which i have used

    Code:
    {
                  xtype:'datefield',           
                  fieldLabel:'created Date',
                 allowBlank:false,
                  id:'createddate',
                  vtype: 'daterange',
                  format:'d-m-Y',
                  name:'apojo.dstart'
    }
    It is showing full calender. I have only one date field in which i have to display current date as default in this datefield when ever i run the application. It has to show only today's date i.e., current date in this field. Please help me out about this issue.


    Thanks in advance
    Samarth Manjunath

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,801
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    So you don't want the date picker to show? To get today's date in there, set the value to new Date()
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Location
    Bangalore
    Posts
    169
    Vote Rating
    0
    samarth is on a distinguished road

      0  

    Default display only current date in date field

    display only current date in date field


    hello Mitchell Simoens

    It will automatically update to the system date know???

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,801
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    If you set

    Code:
    value : new Date()
    It will use the current date/time on the user's computer
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User
    Join Date
    Sep 2011
    Location
    Bangalore
    Posts
    169
    Vote Rating
    0
    samarth is on a distinguished road

      0  

    Default display current date

    display current date


    Hello Mitchell Simoens,

    Thank you. Its working fine
    Mitchell.

  6. #6
    Sencha User
    Join Date
    Nov 2012
    Posts
    1
    Vote Rating
    0
    rkuo is on a distinguished road

      0  

    Default


    you can also set the date to show in the controller, probably in the new/load action for the view.

    (assuming the view is a form)

    formname.findField("NAME OF FIELD").setValue(new Date());



    in your case:

    formname.findField("apojo.dstart").setValue(new Date());

Thread Participants: 2

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi