1. #1
    Sencha User
    Join Date
    Sep 2007
    Location
    Gurgaon
    Posts
    34
    Vote Rating
    0
    Sandeep is on a distinguished road

      0  

    Question How can select current day date and future day date only ?

    How can select current day date and future day date only ?


    Hi,
    I am using extjs 3.3, I am facing a problem.
    I have made a page index.html and index.js. Inside index.js i have some field in formPanel(like textfield, datefield).
    I have calender.js file for calender.
    Inside formpanel i have a textfield that name is "Return" and i am performing clickevent on that textbox, calender would be open. when i select past, current and future day date its work fine.
    Now i want select current day date and future day date only not a past date from my calender.
    If try to click past day date it should not be select.
    And also past day date should be open in different color from current and future day date in calender.
    So, i want a help regarding How can select current day date and future day date only??
    what and where i write code ??
    The link to my html page in http://m.globester.com
    Here is the code which i use.

    {
    xtype:'textfield',
    fieldLabel: 'Return',
    width:240,
    name: 'return',
    id: 'return',
    cls: 'sh_border',
    emptyText:'Enter Date',
    readOnly:true,
    handleMouseEvents: true,
    listeners: {
    'render': function(cmp){
    Ext.getCmp('return').getEl().on('click', function(){
    homeCalendar = new Ext.ux.Calendar({
    dates: {'20090615': 'Test'},
    getData: function(o){
    return this.dates[o.date.format('m/d/Y')];
    },
    // Custom formatting based on date
    formatDay: function(o){
    var data = this.getData(o);
    if (data)
    {
    o.css += " ux-cal-highlight";
    o.caption += "*";
    }
    },
    listeners:
    {
    // Sample for click handling
    click: function(o){
    if (o.date)
    {
    var data = this.getData(o);
    alert(o.date.format('m/d/Y'));
    }
    }
    }
    });
    }
    }

  2. #2
    Sencha User Dumas's Avatar
    Join Date
    Dec 2008
    Location
    Vienna, Austria
    Posts
    582
    Vote Rating
    9
    Dumas will become famous soon enough

      0  

    Default


    Wrong forum?
    You propably wanted to write to the ExtJS 3.0 forum

    regards,
    Roland

Similar Threads

  1. Date displayed as date minus 1 day
    By lucaf in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 12 Aug 2010, 8:48 AM
  2. Date-october-day>10
    By Ryoko in forum Ext 3.x: Help & Discussion
    Replies: 6
    Last Post: 23 Sep 2009, 6:38 PM
  3. How can select future day date only not a past date and current date
    By painter in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 6 Apr 2009, 10:11 PM
  4. How can select current day date and future day date only
    By painter in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 6 Apr 2009, 6:21 AM
  5. Replies: 2
    Last Post: 23 Mar 2009, 12:44 AM

Thread Participants: 1