<?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>Flex Examples &#187; maxYear</title>
	<atom:link href="http://blog.flexexamples.com/tag/maxyear/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Wed, 26 Jan 2011 18:09:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Setting a minimum and maximum allowable year in the DateChooser control in Flex</title>
		<link>http://blog.flexexamples.com/2008/05/04/setting-a-minimum-and-maximum-allowable-year-in-the-datechooser-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/05/04/setting-a-minimum-and-maximum-allowable-year-in-the-datechooser-control-in-flex/#comments</comments>
		<pubDate>Mon, 05 May 2008 06:47:06 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[DateChooser]]></category>
		<category><![CDATA[disabledRanges]]></category>
		<category><![CDATA[maxYear]]></category>
		<category><![CDATA[minYear]]></category>
		<category><![CDATA[rangeEnd]]></category>
		<category><![CDATA[yearNavigationEnabled]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/05/04/setting-a-minimum-and-maximum-allowable-year-in-the-datechooser-control-in-flex/</guid>
		<description><![CDATA[<p>The following examples show how you can set a minimum and maximum allowable year in the Flex DateChooser control by setting the minYear and maxYear properties.</p> <p>Full code after the jump.</p> <p></p> <p>The following example sets the maximum year to the current year, preventing you from using the month-based or year-based navigation to advance to [...]]]></description>
			<content:encoded><![CDATA[<p>The following examples show how you can set a minimum and maximum allowable year in the Flex DateChooser control by setting the <code>minYear</code> and <code>maxYear</code> properties.</p>
<p>Full code after the jump.</p>
<p><span id="more-618"></span></p>
<p>The following example sets the maximum year to the current year, preventing you from using the month-based or year-based navigation to advance to future years (but future months within the same year are allowed):</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/DateChooser_maxYear_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/04/setting-a-minimum-and-maximum-allowable-year-in-the-datechooser-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:DateChooser id="dateChooser"
            yearNavigationEnabled="true"
            initialize="dateChooser.maxYear = new Date().fullYear;" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/DateChooser_maxYear_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/DateChooser_maxYear_test/bin/main.html" width="100%" height="300"></iframe></p>
<p>The following example sets the minimum year to the current year, preventing you from using the month-based or year-based navigation to advance to previous years (but previous months within the same year are allowed). Also, a disabled range is set up using the <code>disabledRanges</code> property which specifies a <code>rangeEnd</code> value of the current date, preventing users from selecting any days prior to today:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/DateChooser_minYear_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/05/04/setting-a-minimum-and-maximum-allowable-year-in-the-datechooser-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:DateChooser id="dateChooser"
            yearNavigationEnabled="true"
            initialize="dateChooser.minYear = new Date().fullYear;"
            disabledRanges="{[{rangeEnd:new Date()}]}" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/DateChooser_minYear_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/DateChooser_minYear_test/bin/main.html" width="100%" height="300"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting a minimum and maximum allowable year in the DateChooser control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/05/04/setting-a-minimum-and-maximum-allowable-year-in-the-datechooser-control-in-flex/',contentID: 'post-618',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'disabledRanges,maxYear,minYear,rangeEnd,yearNavigationEnabled',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/05/04/setting-a-minimum-and-maximum-allowable-year-in-the-datechooser-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Setting a minimum and maximum allowable year in the Flex DateField control</title>
		<link>http://blog.flexexamples.com/2007/12/17/setting-a-minimum-and-maximum-allowable-year-in-the-flex-datefield-control/</link>
		<comments>http://blog.flexexamples.com/2007/12/17/setting-a-minimum-and-maximum-allowable-year-in-the-flex-datefield-control/#comments</comments>
		<pubDate>Mon, 17 Dec 2007 16:45:41 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[DateField]]></category>
		<category><![CDATA[maxYear]]></category>
		<category><![CDATA[minYear]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/17/setting-a-minimum-and-maximum-allowable-year-in-the-flex-datefield-control/</guid>
		<description><![CDATA[<p>The following example shows how you can set a minimum and maximum allowable year in the Flex DateField control by setting the minYear and maxYear properties.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/DateField_maxYear_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2007/12/17/setting-a-minimum-and-maximum-allowable-year-in-the-flex-datefield-control/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="top" backgroundColor="white"&#62; &#60;mx:DateField id="dateField" yearNavigationEnabled="true" minYear="2000" maxYear="2010" /&#62; &#60;/mx:Application&#62; <p [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set a minimum and maximum allowable year in the Flex DateField control by setting the <code>minYear</code> and <code>maxYear</code> properties.</p>
<p>Full code after the jump.</p>
<p><span id="more-373"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/DateField_maxYear_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2007/12/17/setting-a-minimum-and-maximum-allowable-year-in-the-flex-datefield-control/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="top"
        backgroundColor="white"&gt;

    &lt;mx:DateField id="dateField"
            yearNavigationEnabled="true"
            minYear="2000"
            maxYear="2010" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/DateField_maxYear_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/DateField_maxYear_test/bin/main.html" width="100%" height="300"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting a minimum and maximum allowable year in the Flex DateField control on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/12/17/setting-a-minimum-and-maximum-allowable-year-in-the-flex-datefield-control/',contentID: 'post-373',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'maxYear,minYear',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2007/12/17/setting-a-minimum-and-maximum-allowable-year-in-the-flex-datefield-control/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

