<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Setting selectable ranges in the Flex DateField control</title>
	<link>http://blog.flexexamples.com/2007/12/17/setting-selectable-ranges-in-the-flex-datefield-control/</link>
	<description>A bunch of examples for Adobe Flex and ActionScript</description>
	<pubDate>Thu, 08 Jan 2009 12:18:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: Nate</title>
		<link>http://blog.flexexamples.com/2007/12/17/setting-selectable-ranges-in-the-flex-datefield-control/#comment-12911</link>
		<author>Nate</author>
		<pubDate>Fri, 23 May 2008 17:25:00 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/12/17/setting-selectable-ranges-in-the-flex-datefield-control/#comment-12911</guid>
		<description>Okay, I figured out how to assign a selectableRange that isn't hard coded to a DateField that is used as an itemRenderer.  The key piece I was missing was to use outerDocument to reference the object that would be used as the range:
&lt;pre class="code"&gt;
&#60;mx:Script&#62;
&#60;![CDATA[
private var dateRange:Object = new Object();
dateRange["rangeStart"] = startDate;
dateRange["rangeEnd"] = endDate;
]]&#62;
&#60;/mx:Script&#62;

...

&#60;mx:DataGrid&#62;
  &#60;mx:columns&#62;
    &#60;mx:DataGridColumn&#62;
      &#60;mx:itemRenderer&#62;
        &#60;mx:Component&#62;
          &#60;mx:DateField selectableRange="{outerDocument.dateRange}" /&#62;
        &#60;/mx:Component&#62;
      &#60;/mx:itemRenderer&#62;
    &#60;/mx:DataGridColumn&#62;
  &#60;/mx:columns&#62;
&#60;/mx:DataGrid&#62;
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Okay, I figured out how to assign a selectableRange that isn&#8217;t hard coded to a DateField that is used as an itemRenderer.  The key piece I was missing was to use outerDocument to reference the object that would be used as the range:</p>
<pre class="code">
&lt;mx:Script&gt;
&lt;![CDATA[
private var dateRange:Object = new Object();
dateRange["rangeStart"] = startDate;
dateRange["rangeEnd"] = endDate;
]]&gt;
&lt;/mx:Script&gt;

...

&lt;mx:DataGrid&gt;
  &lt;mx:columns&gt;
    &lt;mx:DataGridColumn&gt;
      &lt;mx:itemRenderer&gt;
        &lt;mx:Component&gt;
          &lt;mx:DateField selectableRange="{outerDocument.dateRange}" /&gt;
        &lt;/mx:Component&gt;
      &lt;/mx:itemRenderer&gt;
    &lt;/mx:DataGridColumn&gt;
  &lt;/mx:columns&gt;
&lt;/mx:DataGrid&gt;
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nate</title>
		<link>http://blog.flexexamples.com/2007/12/17/setting-selectable-ranges-in-the-flex-datefield-control/#comment-12845</link>
		<author>Nate</author>
		<pubDate>Wed, 21 May 2008 20:24:02 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/12/17/setting-selectable-ranges-in-the-flex-datefield-control/#comment-12845</guid>
		<description>Is there a way to dynamically assign the rangeStart and rangeEnd?  For instance, I'm using the DateField as the itemEditor in a DataGridColumn, and I need to be able to assign a selectableRange  that isn't hard coded.</description>
		<content:encoded><![CDATA[<p>Is there a way to dynamically assign the rangeStart and rangeEnd?  For instance, I&#8217;m using the DateField as the itemEditor in a DataGridColumn, and I need to be able to assign a selectableRange  that isn&#8217;t hard coded.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: News</title>
		<link>http://blog.flexexamples.com/2007/12/17/setting-selectable-ranges-in-the-flex-datefield-control/#comment-10616</link>
		<author>News</author>
		<pubDate>Sun, 06 Apr 2008 06:42:01 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/12/17/setting-selectable-ranges-in-the-flex-datefield-control/#comment-10616</guid>
		<description>peterd - It's helpfull, thanks</description>
		<content:encoded><![CDATA[<p>peterd - It&#8217;s helpfull, thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ysbostan</title>
		<link>http://blog.flexexamples.com/2007/12/17/setting-selectable-ranges-in-the-flex-datefield-control/#comment-7025</link>
		<author>ysbostan</author>
		<pubDate>Sat, 16 Feb 2008 05:31:39 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/12/17/setting-selectable-ranges-in-the-flex-datefield-control/#comment-7025</guid>
		<description>Nice! very thanx</description>
		<content:encoded><![CDATA[<p>Nice! very thanx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raul Riera</title>
		<link>http://blog.flexexamples.com/2007/12/17/setting-selectable-ranges-in-the-flex-datefield-control/#comment-5196</link>
		<author>Raul Riera</author>
		<pubDate>Tue, 18 Dec 2007 06:36:45 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/12/17/setting-selectable-ranges-in-the-flex-datefield-control/#comment-5196</guid>
		<description>Can this be set where the second datefield will only accept dates higher than the date selected in the first one? Does it support bindable data in that object you pass to the component?</description>
		<content:encoded><![CDATA[<p>Can this be set where the second datefield will only accept dates higher than the date selected in the first one? Does it support bindable data in that object you pass to the component?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
