1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    19
    Vote Rating
    0
    lasy is on a distinguished road

      0  

    Default Unanswered: Disable month if dates of this month are disabled in extjs4.1 using Ext.form.DateFiel

    Unanswered: Disable month if dates of this month are disabled in extjs4.1 using Ext.form.DateFiel


    Hi ,
    I am using Ext.form.DateField i am disabling the dates on a particular condition .
    I need to disable means user can nt select the month or disable the month if the all of the dates of the month is disabled .Below is my code i am using .

    dateFieldForSavedPlanFrom = new Ext.form.DateField({
    format:"m/d/Y",
    disabledDates:["^(?!"+dateArray.join("|")+").*$"],
    name: 'fromPlan',
    fieldLabel: 'From',
    id: 'fromdatePlanId',
    disabledDatesText:"Date not available.",
    listeners: {
    focus:function(objTextfield){
    if(objTextfield.isExpanded === undefined || objTextfield.isExpanded === false)
    {
    objTextfield.expand();
    }

    }
    }

    });




    {
    xtype: dateFieldForSavedPlanFrom,

    },

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,347
    Answers
    3542
    Vote Rating
    846
    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 want to disable all days in a given month or the month from the month drop down?
    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
    Jun 2012
    Posts
    19
    Vote Rating
    0
    lasy is on a distinguished road

      0  

    Default


    Hello

    I am able to disable all the days of the month .
    I need to diable the month if all the days of the month is disable.
    The user can not click the month .

Thread Participants: 1