4/29/2010 11:58:22 PM
Title:
chaging mx_internal Functions
Hi,
I am vasanth. I had a requirement to change the number of days displayed in the DateField component. to Change i found that to change the getNumberOfDaysInMonth in CalenderLayout Class and it is an mx_inetrnal function how can i change and override this functionality.
4/30/2010 2:31:37 AM
you can disable the number of days in datefield component in flex by using the following code, You can specify the single day or a range also. (2010,0,11) means Jan 11th 2010:
<mx:DateField disabledRanges="{[new Date(2010,0,11), {rangeStart:
new Date(2010,0,23), rangeEnd: new Date(2010,1,10)},
{rangeStart: new Date(2010,2,1)}]}"/>
4/30/2010 11:02:05 PM
you may have to extend the dataField component , because there is no method to remove the days , you can just disable them
5/3/2010 12:28:49 AM
i don't want to disable the no of days in datefield. I want to to 30 days in the month of feb because i am developing a custom datefield for arabic calender which contains 30 days in the month of Feb.
5/3/2010 12:57:36 PM
the days are set by an mx_internal function getNumberOfDaysInMonth in CalendarLayout.as class used by DateField component in flex. This is a private method of mx_internal namespace. So there is no direct scope to alter this method.
5/4/2010 6:05:03 AM
Thanks Efrain for your reply.
Can we change the public or protected methods of the mx_internal functions. If so how can we do it. can u post the sample code or the syntax for it.