1. #1
    Sencha User
    Join Date
    Jan 2015
    Posts
    7
    Vote Rating
    0
    sundeep kapadia is on a distinguished road

      0  

    Default how to add a button to Extjs datepicker

    I am trying to add a button next to today button in extjs 3.3 datepicker , but its not coming in, please help me on this . thankyou


    var simple = new Ext.FormPanel({
    labelWidth: 75, // label settings here cascade unless overridden
    url: 'save-form.php',
    frame: true,
    title: 'Simple Form',
    bodyStyle: 'padding:5px 5px 0',
    width: 350,
    items: [
    new Ext.DatePicker ({
    scope:this,
    hideParent:true,
    handler: function(dp, date){
    this.doSuspend(dp, date);
    },
    listeners: {
    'afterrender' : function () {

    new Ext.Button({
    renderTo: this.picker.el.child('td.x-date-bottom', true),
    text: "Reset",
    cls: 'clear-dp',
    //handler: function() {},
    scope: this
    });
    },delay: 100
    }
    }),
    new Ext.form.TimeField({
    minValue: '9:00 AM',
    maxValue: '6:00 PM',
    increment: 30,
    value : '3.00 PM'
    })],

    buttons: [{
    text: 'Save'
    }, {
    text: 'Cancel'
    }],
    renderTo: Ext.getBody()
    });


    https://fiddle.sencha.com/#fiddle/qmv

  2. #2
    Sencha - Support Team tristan.lee's Avatar
    Join Date
    Mar 2015
    Posts
    749
    Vote Rating
    39
    tristan.lee has a spectacular aura about tristan.lee has a spectacular aura about tristan.lee has a spectacular aura about

      1  

    Default

    You can add a button to the picker once the datefield's menu has been created:

    Tristan Lee
    Sencha Inc - Support Engineer


    Having an issue? Help us help you - be detailed; provide some code; demonstrate with a fiddle (fiddle.sencha.com)

    Embed your fiddle in your post: [­FIDDLE] id [­/FIDDLE]

  3. #3
    Sencha User
    Join Date
    Jan 2015
    Posts
    7
    Vote Rating
    0
    sundeep kapadia is on a distinguished road

      0  

    Default it worked!!!!!!!

    it worked !!!!!
    super thanks a lot....

Similar Threads

  1. How: Datepicker next/prev Day Button
    By insnet in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 4 Jan 2013, 1:39 PM
  2. Datepicker Today Button
    By abhishek.chikane in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 15 Dec 2012, 8:03 AM
  3. Over ride datepicker done button
    By DSordillo in forum Sencha Touch 2.x: Discussion
    Replies: 3
    Last Post: 28 Mar 2012, 10:41 AM
  4. DatePicker,can we get the instance of the Button in it?
    By Love Yao in forum Ext GWT: Discussion
    Replies: 2
    Last Post: 21 Jan 2010, 10:01 PM
  5. [3.x][FIXED] Button CSS, DatePicker
    By evant in forum Ext 2.x: Bugs
    Replies: 1
    Last Post: 6 Jul 2008, 8:39 AM

Thread Participants: 1