8 Replies Latest reply on May 24, 2011 12:12 PM by miguel8312

    disable multiple range dates in datechooser/datefield

    miguel8312 Level 3

      Hello guys.

      im wondering if anyone ever came across this problem i know the datechooser/datefield component has the disableRanges method which allows you to bascically send in array with start and end date and disable those days. That works great but what if i want to disable multiple ranges.

       

      has anyone ever come accross this problem.

       

      i have a field like so

       

       

      <mx:DateField x="101" y="6"  id="startDateInput"    change="datefield2_changeHandler(event)"/>


      and in actions ript i do something like this.

       

       startDateInput.disabledRanges = ([new Date(),{rangeStart: new Date(startDateInput.selectedDate.fullYear,startDateInput.selectedDate.month,startDateInput.selectedDate.date), rangeEnd: new Date(endDateInput.selectedDate.fullYear, endDateInput.selectedDate.month, endDateInput.selectedDate.date)}]);
      


      So i have try adding more rangeStart and more rangeEnd to disable more days but nothing works???

      any ideas I could really use some help?

      thanks in advance

      Miguel