<?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: Changing the default calendar icon in a Flex DateField control</title>
	<link>http://blog.flexexamples.com/2007/12/28/changing-the-default-calendar-icon-in-a-flex-datefield-control/</link>
	<description>A bunch of examples for Adobe Flex and ActionScript</description>
	<pubDate>Sat, 06 Sep 2008 17:31:06 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: Brixel</title>
		<link>http://blog.flexexamples.com/2007/12/28/changing-the-default-calendar-icon-in-a-flex-datefield-control/#comment-12291</link>
		<author>Brixel</author>
		<pubDate>Fri, 25 Apr 2008 19:30:15 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/12/28/changing-the-default-calendar-icon-in-a-flex-datefield-control/#comment-12291</guid>
		<description>Thanks Peter,

That is what I ended up using was the labelFunction, but I still think that the DateField should be able to handle the "M/D/YYYY" in the formatString, so thanks for filing the bug.

Brixel</description>
		<content:encoded><![CDATA[<p>Thanks Peter,</p>
<p>That is what I ended up using was the labelFunction, but I still think that the DateField should be able to handle the &#8220;M/D/YYYY&#8221; in the formatString, so thanks for filing the bug.</p>
<p>Brixel</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/12/28/changing-the-default-calendar-icon-in-a-flex-datefield-control/#comment-12290</link>
		<author>peterd</author>
		<pubDate>Fri, 25 Apr 2008 15:25:44 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/12/28/changing-the-default-calendar-icon-in-a-flex-datefield-control/#comment-12290</guid>
		<description>&lt;a href="http://blog.flexexamples.com/2007/12/28/changing-the-default-calendar-icon-in-a-flex-datefield-control/#comment-12284" rel="nofollow"&gt;Brixel&lt;/a&gt;,

I filed a bug in the public Flex bug base, &lt;a href="http://bugs.adobe.com/jira/browse/SDK-15386" rel="nofollow"&gt;&lt;u&gt;http://bugs.adobe.com/jira/browse/SDK-15386&lt;/u&gt;&lt;/a&gt;. Feel free to subscribe to bug updates or add any comments.

I'm not actually sure it is a "bug". According to the Flex 3 docs, the &lt;a href="http://livedocs.adobe.com/flex/3/langref/mx/controls/DateField.html#formatString" rel="nofollow"&gt;&lt;u&gt;DateField formatString property&lt;/a&gt; can contain any combination of "MM", "DD", "YY", "YYYY", delimiter, and punctuation characters.

UPDATE: Actually, another solution may be to use a custom &lt;code&gt;labelFunction&lt;/code&gt; on the DateField, see &lt;a href="http://blog.flexexamples.com/2007/12/12/setting-a-custom-label-function-on-a-flex-datefield-control/" rel="nofollow"&gt;&lt;u&gt;"Setting a custom label function on a Flex DateField control"&lt;/u&gt;&lt;/a&gt;.

&lt;pre class="code"&gt;
&#60;?xml version="1.0" encoding="utf-8"?&#62;
&#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"&#62;

    &#60;mx:Script&#62;
        &#60;![CDATA[
            private function dateField_labelFunc(item:Date):String {
                return dateFormatter.format(item);
            }
        ]]&#62;
    &#60;/mx:Script&#62;

    &#60;mx:DateFormatter id="dateFormatter" formatString="M/D/YYYY" /&#62;

    &#60;mx:DateField id="dateField"
            initialize="dateField.selectedDate = new Date(2008,3,1);"
            labelFunction="dateField_labelFunc"  /&#62;

&#60;/mx:Application&#62;
&lt;/pre&gt;

Thanks,
Peter</description>
		<content:encoded><![CDATA[<p><a href="http://blog.flexexamples.com/2007/12/28/changing-the-default-calendar-icon-in-a-flex-datefield-control/#comment-12284" rel="nofollow">Brixel</a>,</p>
<p>I filed a bug in the public Flex bug base, <a href="http://bugs.adobe.com/jira/browse/SDK-15386" rel="nofollow"><u><a href="http://bugs.adobe.com/jira/browse/SDK-15386" rel="nofollow">http://bugs.adobe.com/jira/browse/SDK-15386</a></u></a>. Feel free to subscribe to bug updates or add any comments.</p>
<p>I&#8217;m not actually sure it is a &#8220;bug&#8221;. According to the Flex 3 docs, the <a href="http://livedocs.adobe.com/flex/3/langref/mx/controls/DateField.html#formatString" rel="nofollow"><u>DateField formatString property</u></a> can contain any combination of &#8220;MM&#8221;, &#8220;DD&#8221;, &#8220;YY&#8221;, &#8220;YYYY&#8221;, delimiter, and punctuation characters.</p>
<p>UPDATE: Actually, another solution may be to use a custom <code>labelFunction</code> on the DateField, see <a href="http://blog.flexexamples.com/2007/12/12/setting-a-custom-label-function-on-a-flex-datefield-control/" rel="nofollow"><u>&#8220;Setting a custom label function on a Flex DateField control&#8221;</u></a>.</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"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            private function dateField_labelFunc(item:Date):String {
                return dateFormatter.format(item);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:DateFormatter id="dateFormatter" formatString="M/D/YYYY" /&gt;

    &lt;mx:DateField id="dateField"
            initialize="dateField.selectedDate = new Date(2008,3,1);"
            labelFunction="dateField_labelFunc"  /&gt;

&lt;/mx:Application&gt;
</pre>
<p>Thanks,<br />
Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brixel</title>
		<link>http://blog.flexexamples.com/2007/12/28/changing-the-default-calendar-icon-in-a-flex-datefield-control/#comment-12284</link>
		<author>Brixel</author>
		<pubDate>Fri, 25 Apr 2008 11:51:12 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/12/28/changing-the-default-calendar-icon-in-a-flex-datefield-control/#comment-12284</guid>
		<description>Peter,

After work I tried to recreate it locally to submit the example, but was unable to reproduce. So I became suspicous of working over the VPN and waited until this morning to try it again locally. It worked fine this morning, so it must have been some sort of display issue ( which I've noticed both locally and remote a few times with Flex ).

That said, off topic, I did run across something with the formatString property of the DateField. I noticed it doesn't support the common short date format "M/D/YYYY". It formats the date as "MM/DD/YYYY" and removes the "/" slash separators. So:

myDateField.formatString = "M/D/YYYY";
myDateField.selectedDate = new Date();

Would display as: 04252008
Instead of: 4/25/2008

This I can reproduce at will. Is this a known issue already or should I submit? I did some poking and was unable to find it as a known issue.</description>
		<content:encoded><![CDATA[<p>Peter,</p>
<p>After work I tried to recreate it locally to submit the example, but was unable to reproduce. So I became suspicous of working over the VPN and waited until this morning to try it again locally. It worked fine this morning, so it must have been some sort of display issue ( which I&#8217;ve noticed both locally and remote a few times with Flex ).</p>
<p>That said, off topic, I did run across something with the formatString property of the DateField. I noticed it doesn&#8217;t support the common short date format &#8220;M/D/YYYY&#8221;. It formats the date as &#8220;MM/DD/YYYY&#8221; and removes the &#8220;/&#8221; slash separators. So:</p>
<p>myDateField.formatString = &#8220;M/D/YYYY&#8221;;<br />
myDateField.selectedDate = new Date();</p>
<p>Would display as: 04252008<br />
Instead of: 4/25/2008</p>
<p>This I can reproduce at will. Is this a known issue already or should I submit? I did some poking and was unable to find it as a known issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/12/28/changing-the-default-calendar-icon-in-a-flex-datefield-control/#comment-12264</link>
		<author>peterd</author>
		<pubDate>Thu, 24 Apr 2008 16:48:16 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/12/28/changing-the-default-calendar-icon-in-a-flex-datefield-control/#comment-12264</guid>
		<description>&lt;a href="http://blog.flexexamples.com/2007/12/28/changing-the-default-calendar-icon-in-a-flex-datefield-control/#comment-12258" rel="nofollow"&gt;Brixel&lt;/a&gt;,

Would you mind filing a bug at http://bugs.adobe.com/flex/ (file it in the Flex SDK project and the "mx:DateField" component). Also, if you could attach a small, reproducible test case to the bug, that would help out a lot.

Finally, if you post the bug number here, maybe a few of us here can vote and subscribe to the bug. :)

Thanks,
Peter</description>
		<content:encoded><![CDATA[<p><a href="http://blog.flexexamples.com/2007/12/28/changing-the-default-calendar-icon-in-a-flex-datefield-control/#comment-12258" rel="nofollow">Brixel</a>,</p>
<p>Would you mind filing a bug at <a href="http://bugs.adobe.com/flex/" rel="nofollow">http://bugs.adobe.com/flex/</a> (file it in the Flex SDK project and the &#8220;mx:DateField&#8221; component). Also, if you could attach a small, reproducible test case to the bug, that would help out a lot.</p>
<p>Finally, if you post the bug number here, maybe a few of us here can vote and subscribe to the bug. :)</p>
<p>Thanks,<br />
Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brixel</title>
		<link>http://blog.flexexamples.com/2007/12/28/changing-the-default-calendar-icon-in-a-flex-datefield-control/#comment-12258</link>
		<author>Brixel</author>
		<pubDate>Thu, 24 Apr 2008 13:45:16 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/12/28/changing-the-default-calendar-icon-in-a-flex-datefield-control/#comment-12258</guid>
		<description>Hey Peter,

I'm on Flex 3 and this example doesn't work for me. My DateField's  are in a separate component that gets called into action through the PopUpManager. I can get it to work only if I do not set the "disabledSkin" style. For some reason, setting that one to null, or to even another embedded image, causes none of the icon styles to show for the control.

I've been able to find almost no information on this. I've also tried various things like setting the styles on "creationComplete", directly setting the styles inline, etc. but nothing seems to solve the problem.

Any idea to what might be happening or what else I might try? Thanks.</description>
		<content:encoded><![CDATA[<p>Hey Peter,</p>
<p>I&#8217;m on Flex 3 and this example doesn&#8217;t work for me. My DateField&#8217;s  are in a separate component that gets called into action through the PopUpManager. I can get it to work only if I do not set the &#8220;disabledSkin&#8221; style. For some reason, setting that one to null, or to even another embedded image, causes none of the icon styles to show for the control.</p>
<p>I&#8217;ve been able to find almost no information on this. I&#8217;ve also tried various things like setting the styles on &#8220;creationComplete&#8221;, directly setting the styles inline, etc. but nothing seems to solve the problem.</p>
<p>Any idea to what might be happening or what else I might try? Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/12/28/changing-the-default-calendar-icon-in-a-flex-datefield-control/#comment-7147</link>
		<author>peterd</author>
		<pubDate>Sun, 24 Feb 2008 07:43:12 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/12/28/changing-the-default-calendar-icon-in-a-flex-datefield-control/#comment-7147</guid>
		<description>Varun Shetty,

Are you using Flex 2 or Flex 3? I compiled this with Flex 3, and I believe the behavior changed slightly. For example, if I hold down Ctrl and click the currently selected date again, it deselects the date. I don't remember the exact behavior in Flex 2 though.

Peter</description>
		<content:encoded><![CDATA[<p>Varun Shetty,</p>
<p>Are you using Flex 2 or Flex 3? I compiled this with Flex 3, and I believe the behavior changed slightly. For example, if I hold down Ctrl and click the currently selected date again, it deselects the date. I don&#8217;t remember the exact behavior in Flex 2 though.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Varun Shetty</title>
		<link>http://blog.flexexamples.com/2007/12/28/changing-the-default-calendar-icon-in-a-flex-datefield-control/#comment-7146</link>
		<author>Varun Shetty</author>
		<pubDate>Sun, 24 Feb 2008 00:39:41 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/12/28/changing-the-default-calendar-icon-in-a-flex-datefield-control/#comment-7146</guid>
		<description>how do you still have the date displayed after you select a date for the second time. 

the default flex behavior would disable the selected date if you select it again. 

for some reason all your date field flex examples have the opposite behavior.. and i have seen your code you have not included anything different that would not do this.</description>
		<content:encoded><![CDATA[<p>how do you still have the date displayed after you select a date for the second time. </p>
<p>the default flex behavior would disable the selected date if you select it again. </p>
<p>for some reason all your date field flex examples have the opposite behavior.. and i have seen your code you have not included anything different that would not do this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raul Riera</title>
		<link>http://blog.flexexamples.com/2007/12/28/changing-the-default-calendar-icon-in-a-flex-datefield-control/#comment-5605</link>
		<author>Raul Riera</author>
		<pubDate>Sat, 29 Dec 2007 07:47:19 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/12/28/changing-the-default-calendar-icon-in-a-flex-datefield-control/#comment-5605</guid>
		<description>I love your examples, I would like to see more examples about changing the default animation effect of the componnents.

Keep up the good work.</description>
		<content:encoded><![CDATA[<p>I love your examples, I would like to see more examples about changing the default animation effect of the componnents.</p>
<p>Keep up the good work.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
