<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Customizing the current date in the Flex DateField control</title>
	<atom:link href="http://blog.flexexamples.com/2007/12/19/customizing-the-current-date-in-the-flex-datefield-control/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2007/12/19/customizing-the-current-date-in-the-flex-datefield-control/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sun, 12 Feb 2012 19:26:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: BOB</title>
		<link>http://blog.flexexamples.com/2007/12/19/customizing-the-current-date-in-the-flex-datefield-control/comment-page-1/#comment-9415</link>
		<dc:creator>BOB</dc:creator>
		<pubDate>Thu, 21 Jul 2011 23:14:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/19/customizing-the-current-date-in-the-flex-datefield-control/#comment-9415</guid>
		<description>Hello shem. you can use property yearNavigationEnabled=&quot;true&quot; in mx:datefield to navigate the year.</description>
		<content:encoded><![CDATA[<p>Hello shem. you can use property yearNavigationEnabled=&#8221;true&#8221; in mx:datefield to navigate the year.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shem</title>
		<link>http://blog.flexexamples.com/2007/12/19/customizing-the-current-date-in-the-flex-datefield-control/comment-page-1/#comment-9158</link>
		<dc:creator>shem</dc:creator>
		<pubDate>Mon, 25 Apr 2011 02:00:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/19/customizing-the-current-date-in-the-flex-datefield-control/#comment-9158</guid>
		<description>hi .. is it possible to allow the user to directly change the year instead of passing each and every month just to reach the desired date?</description>
		<content:encoded><![CDATA[<p>hi .. is it possible to allow the user to directly change the year instead of passing each and every month just to reach the desired date?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://blog.flexexamples.com/2007/12/19/customizing-the-current-date-in-the-flex-datefield-control/comment-page-1/#comment-6360</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Sat, 14 Nov 2009 16:33:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/19/customizing-the-current-date-in-the-flex-datefield-control/#comment-6360</guid>
		<description>I tried this code but i am not able to get the desired color in the date field</description>
		<content:encoded><![CDATA[<p>I tried this code but i am not able to get the desired color in the date field</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raju</title>
		<link>http://blog.flexexamples.com/2007/12/19/customizing-the-current-date-in-the-flex-datefield-control/comment-page-1/#comment-5710</link>
		<dc:creator>Raju</dc:creator>
		<pubDate>Fri, 11 Sep 2009 12:16:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/19/customizing-the-current-date-in-the-flex-datefield-control/#comment-5710</guid>
		<description>Hi,
Is it possible to change the color of the day depending on some xml data put in data provider of an DateChooser?
like I hav the following:

&lt;pre lang=&quot;mxml&quot;&gt;


         
        DateChooser {
            dateChooserStyleName: myDateChooser;
        }

        .myDateChooser {
            background-color:red;           
            font-size:12;
            
        }

        .myToday {
            
            fontWeight: bold;
            font-size:14;
            font-thickness:4;
            background-color:yellow;
            
        }
    

	
		 0)
        {
         for (var i:uint=0; i &lt; mycal.numChildren; i++)
         {
          var calendarObj:Object=mycal.getChildAt(i);
          if (calendarObj.hasOwnProperty(&quot;className&quot;))
          {
            if (calendarObj.className == &quot;CalendarLayout&quot;)
            {
              var cal:CalendarLayout=CalendarLayout(calendarObj);

              for (var j:uint=0; j  0)
                  {
                    for (var k:uint=0; k &lt; eventArray.length; k++)
                    {
                      dayHTML+=&quot;&lt;a HREF=&#039;Event:&quot; + eventArray[k].data + &quot;&#039; rel=&quot;nofollow&quot;&gt;&quot; + eventArray[k].label + &quot;&lt;/A&gt;&quot;;
                      
                    }
                    
                    day.htmlText=dayHTML;
                    day.styleName=&quot;myToday&quot;;
                    mycal.validateDisplayList();
                   //Alert.show(&quot;inside last Loop  &quot;+dayHTML);
                   // day.opaqueBackground=true;
                    
                  }
                }
              }
            }
          }
         }
       }
      }

      private function linkHandler(event:TextEvent):void
      {
        Alert.show(&quot;Event: &quot; + event.text);
      }

      private function dateHelper(renderedDate:String):Array
      {
        var result:Array=new Array();
        for (var i:uint=0; i 
	
	
	   
         
         
         
         
            
          
            

And the data1.xml as :




8/22/2009
This is  a test 1
Stephens Test 1


8/23/2009
This is  a test 2
Stephens Test 2



&lt;/pre&gt;

I want to highlight only the days have some event in thedata1. xml.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Is it possible to change the color of the day depending on some xml data put in data provider of an DateChooser?<br />
like I hav the following:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;">&nbsp;
&nbsp;
&nbsp;
        DateChooser {
            dateChooserStyleName: myDateChooser;
        }
&nbsp;
        .myDateChooser {
            background-color:red;           
            font-size:12;
&nbsp;
        }
&nbsp;
        .myToday {
&nbsp;
            fontWeight: bold;
            font-size:14;
            font-thickness:4;
            background-color:yellow;
&nbsp;
        }
&nbsp;
&nbsp;
&nbsp;
		 0)
        {
         for (var i:uint=0; i <span style="color: #ddbb00;">&amp;lt;</span> mycal.numChildren; i++)
         {
          var calendarObj:Object=mycal.getChildAt(i);
          if (calendarObj.hasOwnProperty(<span style="color: #ddbb00;">&amp;quot;</span>className<span style="color: #ddbb00;">&amp;quot;</span>))
          {
            if (calendarObj.className == <span style="color: #ddbb00;">&amp;quot;</span>CalendarLayout<span style="color: #ddbb00;">&amp;quot;</span>)
            {
              var cal:CalendarLayout=CalendarLayout(calendarObj);
&nbsp;
              for (var j:uint=0; j  0)
                  {
                    for (var k:uint=0; k <span style="color: #ddbb00;">&amp;lt;</span> eventArray.length; k++)
                    {
                      dayHTML+=<span style="color: #ddbb00;">&amp;quot;</span><span style="color: #000000;">&lt;a HREF=<span style="color: #ff0000;">'Event:&quot; + eventArray[k].data + &quot;'</span> rel=<span style="color: #ff0000;">&quot;nofollow&quot;</span><span style="color: #7400FF;">&gt;</span></span>&quot; + eventArray[k].label + &quot;<span style="color: #000000;">&lt;/A<span style="color: #7400FF;">&gt;</span></span>&quot;;
&nbsp;
                    }
&nbsp;
                    day.htmlText=dayHTML;
                    day.styleName=&quot;myToday&quot;;
                    mycal.validateDisplayList();
                   //Alert.show(&quot;inside last Loop  &quot;+dayHTML);
                   // day.opaqueBackground=true;
&nbsp;
                  }
                }
              }
            }
          }
         }
       }
      }
&nbsp;
      private function linkHandler(event:TextEvent):void
      {
        Alert.show(&quot;Event: &quot; + event.text);
      }
&nbsp;
      private function dateHelper(renderedDate:String):Array
      {
        var result:Array=new Array();
        for (var i:uint=0; i 
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
And the data1.xml as :
&nbsp;
&nbsp;
&nbsp;
&nbsp;
8/22/2009
This is  a test 1
Stephens Test 1
&nbsp;
&nbsp;
8/23/2009
This is  a test 2
Stephens Test 2</pre></div></div>

<p>I want to highlight only the days have some event in thedata1. xml.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nathan</title>
		<link>http://blog.flexexamples.com/2007/12/19/customizing-the-current-date-in-the-flex-datefield-control/comment-page-1/#comment-2138</link>
		<dc:creator>Nathan</dc:creator>
		<pubDate>Thu, 09 Apr 2009 07:12:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/19/customizing-the-current-date-in-the-flex-datefield-control/#comment-2138</guid>
		<description>Hey is there a way to change the color of the day any day I want based on a variable.
Like if the string on a database is this then the color of the specific day on the datechooser will be labeled in purple or green.</description>
		<content:encoded><![CDATA[<p>Hey is there a way to change the color of the day any day I want based on a variable.<br />
Like if the string on a database is this then the color of the specific day on the datechooser will be labeled in purple or green.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/12/19/customizing-the-current-date-in-the-flex-datefield-control/comment-page-1/#comment-2135</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Thu, 15 May 2008 15:28:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/19/customizing-the-current-date-in-the-flex-datefield-control/#comment-2135</guid>
		<description>&lt;a href=&quot;http://blog.flexexamples.com/2007/12/19/customizing-the-current-date-in-the-flex-datefield-control/#comment-12696&quot; rel=&quot;nofollow&quot;&gt;tkong&lt;/a&gt;,

Something like this?
&lt;pre class=&quot;code&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
        layout=&quot;vertical&quot;
        verticalAlign=&quot;middle&quot;
        backgroundColor=&quot;white&quot;&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            private function init():void {
                var theFuture:Date = new Date();
                theFuture.month += 2;
                dateChooser.displayedYear = theFuture.fullYear;
                dateChooser.displayedMonth = theFuture.month;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock=&quot;true&quot;&gt;
        &lt;mx:Button label=&quot;Current date&quot;
                click=&quot;dateChooser.selectedDate = new Date();&quot; /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:DateChooser id=&quot;dateChooser&quot;
            initialize=&quot;init();&quot; /&gt;

&lt;/mx:Application&gt;
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p><a href="http://blog.flexexamples.com/2007/12/19/customizing-the-current-date-in-the-flex-datefield-control/#comment-12696" rel="nofollow">tkong</a>,</p>
<p>Something like this?</p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            private function init():void {
                var theFuture:Date = new Date();
                theFuture.month += 2;
                dateChooser.displayedYear = theFuture.fullYear;
                dateChooser.displayedMonth = theFuture.month;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Button label="Current date"
                click="dateChooser.selectedDate = new Date();" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:DateChooser id="dateChooser"
            initialize="init();" /&gt;

&lt;/mx:Application&gt;
</pre>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tkong</title>
		<link>http://blog.flexexamples.com/2007/12/19/customizing-the-current-date-in-the-flex-datefield-control/comment-page-1/#comment-2137</link>
		<dc:creator>tkong</dc:creator>
		<pubDate>Thu, 15 May 2008 08:59:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/19/customizing-the-current-date-in-the-flex-datefield-control/#comment-2137</guid>
		<description>Hi Peter,

How about when the calendar is showing any month other than this month;
then when the showToday is checked the month will redraw the current month, with today highlighted, of course.

Thanks in advance.

tkong</description>
		<content:encoded><![CDATA[<p>Hi Peter,</p>
<p>How about when the calendar is showing any month other than this month;<br />
then when the showToday is checked the month will redraw the current month, with today highlighted, of course.</p>
<p>Thanks in advance.</p>
<p>tkong</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/12/19/customizing-the-current-date-in-the-flex-datefield-control/comment-page-1/#comment-2136</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Tue, 29 Apr 2008 03:54:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/19/customizing-the-current-date-in-the-flex-datefield-control/#comment-2136</guid>
		<description>&lt;a href=&quot;http://blog.flexexamples.com/2007/12/19/customizing-the-current-date-in-the-flex-datefield-control/#comment-12349&quot; rel=&quot;nofollow&quot;&gt;Avery&lt;/a&gt;

Yes.

Peter</description>
		<content:encoded><![CDATA[<p><a href="http://blog.flexexamples.com/2007/12/19/customizing-the-current-date-in-the-flex-datefield-control/#comment-12349" rel="nofollow">Avery</a></p>
<p>Yes.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Avery</title>
		<link>http://blog.flexexamples.com/2007/12/19/customizing-the-current-date-in-the-flex-datefield-control/comment-page-1/#comment-2134</link>
		<dc:creator>Avery</dc:creator>
		<pubDate>Tue, 29 Apr 2008 02:46:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/12/19/customizing-the-current-date-in-the-flex-datefield-control/#comment-2134</guid>
		<description>Hello Peter.

&lt;pre class=&quot;code&quot;&gt;
        DateField {
            todayColor: haloOrange;
            dateChooserStyleName: myCustomDateChooser;
        }

        .myCustomDateChooser {
            todayStyleName: myCustomTodayStyleName;
        }

        .myCustomTodayStyleName {
            color: black;
            fontStyle: italic;
            fontWeight: bold;
        }
&lt;/pre&gt;

Can you leave a demo here? Can I change whatever the color I want?</description>
		<content:encoded><![CDATA[<p>Hello Peter.</p>
<pre class="code">
        DateField {
            todayColor: haloOrange;
            dateChooserStyleName: myCustomDateChooser;
        }

        .myCustomDateChooser {
            todayStyleName: myCustomTodayStyleName;
        }

        .myCustomTodayStyleName {
            color: black;
            fontStyle: italic;
            fontWeight: bold;
        }
</pre>
<p>Can you leave a demo here? Can I change whatever the color I want?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

