0 Replies Latest reply on Jul 5, 2007 4:26 PM by MyronCope

    Make DateField a dropdown

    MyronCope Level 1
      I have a date control in my mxml page like so:
      <CODE>
      <mx:DateField x="115" y="260" width="100" id="df_lastdate" height="20" cornerRadius="10" borderColor="#565656" />
      <mx:TextInput x="220" y="260" height="20" width="25" id="txti_lasthour" maxChars="2" borderColor="#565656" cornerRadius="10"/>
      <mx:Label x="240" y="260" text=":" textAlign="right" width="15" height="22" color="#ffffff"/>
      <mx:TextInput x="255" y="260" height="20" width="25" id="txti_lastminute" maxChars="2" borderColor="#565656" cornerRadius="10"/>
      <mx:ComboBox id="cb_lasttimetype" x="287" y="260" width="50" fontWeight="normal" fillColors="[#ffe8b3, #ffffff]" height="20" cornerRadius="10" paddingLeft="0" fillAlphas="[1.0, 0.5]">
      <mx:dataProvider>
      <mx:Object label="AM" data="AM"/>
      <mx:Object label="PM" data="PM"/>
      /mx:dataProvider>
      </mx:ComboBox>
      </CODE>

      There are two textinputs, one is for the hours and one is for minutes. I want to change these textinputs so to combo-boxes where the user can select hours for one and minutes for the other combox. How do I do this? any sample code? thanks