header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
vasanth
Points:0
Posts:0

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.



1
Rex
Points: 1280
Posts:0
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)}]}"/>


2
Lester
Points: 0
Posts:0
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

3
vasanth
Points: 0
Posts:0
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.

4
Efrain
Points: 0
Posts:0
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
vasanth
Points: 0
Posts:0
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.


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 0+3 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions