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

5/29/2010 8:39:45 AM

Title: DateField Change Event


Hi,

I have two labels and one date field.

Label 1: " Rama"

Label 2: "Krishna"

Date : 29/05/2007

Whenever i change the date , the lables will be empty, I done it.

but my question is

Whenever i click the datefield it is empty, and When i select the same date , the labels will be empty, Whenever i select the date , it is not empty. How to do it, I want the condition? please provide the Condition?


Thanks
Rama



1
Flash_Guy
Points: 490
Posts:0
5/29/2010 11:25:29 AM



if you implement empty on click then there is no way to do not empty label on selection, because to select you first have to click.

If you implement empty label on release then you can check on release of textbox that if some text is selected then do not empty label , and if nothing selected then empty it.

2
Rex
Points: 680
Posts:0
5/30/2010 12:57:46 AM



If previous selected date is same as the new selected then the label won't get empty.




			private var previousDate:Date;
			protected function datefield1_changeHandler(event:CalendarLayoutChangeEvent):void
			{
				if(event.newDate != previousDate && previousDate !=null  ){
				myLabel.text="";
				}
				previousDate=event.newDate;
			}

		]]>
	</mx:Script>
	<mx:DateField id="myDateField" showToday="true" x="90" y="261" change="datefield1_changeHandler(event)"/>
	<mx:Label id="myLabel" x="75" y="193" text="Label" />



Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 4+6 



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