<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>joel&#039;s FLEX blog &#187; DateField</title>
	<atom:link href="http://blog.desizen.com/TAG/datefield/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.desizen.com</link>
	<description>FLEX,网络安全,Linux</description>
	<lastBuildDate>Fri, 13 May 2011 02:18:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>FLEX例子之日期弹出选择框(DateField)</title>
		<link>http://blog.desizen.com/4lone/285.html</link>
		<comments>http://blog.desizen.com/4lone/285.html#comments</comments>
		<pubDate>Fri, 26 Dec 2008 04:59:37 +0000</pubDate>
		<dc:creator>joel</dc:creator>
				<category><![CDATA[FLEX]]></category>
		<category><![CDATA[DateField]]></category>
		<category><![CDATA[TourDeFlex]]></category>
		<category><![CDATA[例子]]></category>

		<guid isPermaLink="false">http://www.joelove.cn/?p=285</guid>
		<description><![CDATA[这个例子进行的是UI Controls:Data Entry Controls:DateField 我不知道我这样的翻译是不是正确,不过它的功能就是给出一个文本域,点击后就弹出一个日期选择框可供选择. 以下是它的简介: The DateField control is a text field that shows the date with a calendar icon on its right side. When the user clicks anywhere inside the bounding box of the control, a DateChooser control pops up and shows the dates in the month of the current date. If no [...]]]></description>
			<content:encoded><![CDATA[<p>这个例子进行的是UI Controls:Data Entry Controls:<a href="http://blog.desizen.com/TAG/datefield" class="st_tag internal_tag" rel="tag" title="Posts tagged with DateField">DateField</a><br />
我不知道我这样的翻译是不是正确<span id="more-285"></span>,不过它的功能就是给出一个文本域,点击后就弹出一个日期选择框可供选择.<br />
以下是它的简介:<br />
The <a href="http://blog.desizen.com/TAG/datefield" class="st_tag internal_tag" rel="tag" title="Posts tagged with DateField">DateField</a> control is a text field that shows the date with a calendar icon on its right side. When the user clicks anywhere inside the bounding box of the control, a DateChooser control pops up and shows the dates in the month of the current date. If no date is selected, the text field is blank and the month of the current date is displayed in the DateChooser control. When the DateChooser control is open, the user can scroll through months and years, and select a date. When a date is selected, the DateChooser control closes, and the text field shows the selected date. The user can also type the date in the text field if the editable property of the <a href="http://blog.desizen.com/TAG/datefield" class="st_tag internal_tag" rel="tag" title="Posts tagged with DateField">DateField</a> control is set to true.<br />
例子:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- Simple example to demonstrate the DateField control. --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> layout=<span style="color: #ff0000;">&quot;horizontal&quot;</span> verticalAlign=<span style="color: #ff0000;">&quot;top&quot;</span></span>
<span style="color: #000000;">    horizontalAlign=<span style="color: #ff0000;">&quot;center&quot;</span> backgroundGradientColors=<span style="color: #ff0000;">&quot;[0x000000,0x323232]&quot;</span> paddingTop=<span style="color: #ff0000;">&quot;0&quot;</span> paddingBottom=<span style="color: #ff0000;">&quot;0&quot;</span> viewSourceURL=<span style="color: #ff0000;">&quot;srcview/index.html&quot;</span><span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!--这个例子与之前所介绍的DateChooser极其的相似,所以就没有加注释了--&gt;</span></span>
    <span style="color: #339933;">&lt;mx:Script&gt;</span>
<span style="color: #339933;">      &lt;![CDATA[</span>
&nbsp;
<span style="color: #339933;">         // Event handler for the DateField change event.</span>
<span style="color: #339933;">         private function dateChanged(date:Date):void {</span>
<span style="color: #339933;">            if (date == null)</span>
<span style="color: #339933;">                selection.text = &quot;Date selected: &quot;;                </span>
<span style="color: #339933;">            else</span>
<span style="color: #339933;">                selection.text = &quot;Date selected: &quot; + date.getFullYear().toString() + </span>
<span style="color: #339933;">                    '/' + (date.getMonth()+1).toString() + '/' + date.getDate();</span>
<span style="color: #339933;">         }</span>
<span style="color: #339933;">      ]]&gt;</span>
<span style="color: #339933;">    &lt;/mx:Script&gt;</span>
&nbsp;
 <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:DateFormatter</span> id=<span style="color: #ff0000;">&quot;df&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Panel</span> title=<span style="color: #ff0000;">&quot;DateField Control Example&quot;</span> width=<span style="color: #ff0000;">&quot;600&quot;</span> color=<span style="color: #ff0000;">&quot;0xffffff&quot;</span> borderAlpha=<span style="color: #ff0000;">&quot;0.15&quot;</span> height=<span style="color: #ff0000;">&quot;240&quot;</span></span>
<span style="color: #000000;">       layout=<span style="color: #ff0000;">&quot;horizontal&quot;</span> horizontalGap=<span style="color: #ff0000;">&quot;15&quot;</span> paddingLeft=<span style="color: #ff0000;">&quot;10&quot;</span> paddingTop=<span style="color: #ff0000;">&quot;10&quot;</span> paddingRight=<span style="color: #ff0000;">&quot;10&quot;</span> paddingBottom=<span style="color: #ff0000;">&quot;10&quot;</span> horizontalScrollPolicy=<span style="color: #ff0000;">&quot;off&quot;</span> verticalScrollPolicy=<span style="color: #ff0000;">&quot;off&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:VBox</span> width=<span style="color: #ff0000;">&quot;50%&quot;</span> borderColor=<span style="color: #ff0000;">&quot;0xDCDCDC&quot;</span> borderStyle=<span style="color: #ff0000;">&quot;solid&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span> paddingLeft=<span style="color: #ff0000;">&quot;10&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> id=<span style="color: #ff0000;">&quot;selection&quot;</span> color=<span style="color: #ff0000;">&quot;0x323232&quot;</span> text=<span style="color: #ff0000;">&quot;Date selected:&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:DateField</span> id=<span style="color: #ff0000;">&quot;dateField1&quot;</span> yearNavigationEnabled=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">                change=<span style="color: #ff0000;">&quot;dateChanged(DateField(event.target).selectedDate)&quot;</span> color=<span style="color: #ff0000;">&quot;0x000000&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> color=<span style="color: #ff0000;">&quot;0x000000&quot;</span> text=<span style="color: #ff0000;">&quot;Basic DateField:&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Text</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span> color=<span style="color: #ff0000;">&quot;0x323232&quot;</span></span>
<span style="color: #000000;">                text=<span style="color: #ff0000;">&quot;Select a date in the DateField control. Select it again while holding down the Control key to clear it.&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:VBox</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:VBox</span> width=<span style="color: #ff0000;">&quot;50%&quot;</span> borderColor=<span style="color: #ff0000;">&quot;0xDCDCDC&quot;</span> borderStyle=<span style="color: #ff0000;">&quot;solid&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span> paddingLeft=<span style="color: #ff0000;">&quot;10&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Label</span> color=<span style="color: #ff0000;">&quot;0x323232&quot;</span> text=<span style="color: #ff0000;">&quot;Date selected: {df.format(dateField2.selectedDate)}&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:DateField</span> id=<span style="color: #ff0000;">&quot;dateField2&quot;</span> yearNavigationEnabled=<span style="color: #ff0000;">&quot;true&quot;</span> </span>
<span style="color: #000000;">                disabledRanges=<span style="color: #ff0000;">&quot;{[ {rangeEnd: new Date(2008, 9, 31)} ]}&quot;</span> color=<span style="color: #ff0000;">&quot;0x000000&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Text</span> color=<span style="color: #ff0000;">&quot;0x000000&quot;</span> text=<span style="color: #ff0000;">&quot;Disable dates on or before Oct 31, 2008.&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:VBox</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Panel</span><span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>


	标签：<a href="http://blog.desizen.com/TAG/datefield" title="DateField" rel="tag">DateField</a>, <a href="http://blog.desizen.com/TAG/flex" title="FLEX" rel="tag">FLEX</a>, <a href="http://blog.desizen.com/TAG/tourdeflex" title="TourDeFlex" rel="tag">TourDeFlex</a>, <a href="http://blog.desizen.com/TAG/%e4%be%8b%e5%ad%90" title="例子" rel="tag">例子</a><br />

	<h4>相关日志</h4>
	<ul class="st-related-posts">
	<li><a href="http://blog.desizen.com/4lone/227.html" title="学java挺累的 (2008年11月13日)">学java挺累的</a> (0)</li>
	<li><a href="http://blog.desizen.com/4lone/199.html" title="KingCMS之模块管理 (2008年10月27日)">KingCMS之模块管理</a> (0)</li>
	<li><a href="http://blog.desizen.com/4lone/231.html" title="flex-for循环语句 (2008年11月17日)">flex-for循环语句</a> (0)</li>
	<li><a href="http://blog.desizen.com/4lone/271.html" title="FLEX例子之下拉列表框(ComboBox) (2008年12月23日)">FLEX例子之下拉列表框(ComboBox)</a> (1)</li>
	<li><a href="http://blog.desizen.com/4lone/537.html" title="FLEX例子之数据表(DataGrid) (2009年2月25日)">FLEX例子之数据表(DataGrid)</a> (0)</li>
	<li><a href="http://blog.desizen.com/4lone/59.html" title="flex登陆框实例 (2008年8月25日)">flex登陆框实例</a> (3)</li>
	<li><a href="http://blog.desizen.com/4lone/63.html" title="FLEX中嵌入html代码 (2008年8月25日)">FLEX中嵌入html代码</a> (1)</li>
	<li><a href="http://blog.desizen.com/4lone/605.html" title="FLEX例子之应用程序控制条(ApplicationControlBar) (2009年3月14日)">FLEX例子之应用程序控制条(ApplicationControlBar)</a> (1)</li>
	<li><a href="http://blog.desizen.com/4lone/53.html" title="我的第一个FLEX作品 (2008年8月20日)">我的第一个FLEX作品</a> (5)</li>
	<li><a href="http://blog.desizen.com/sitemap" title="SiteMap (2008年6月10日)">SiteMap</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://blog.desizen.com/4lone/285.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

