Spark Datefield and Datechooser

The spark framework was released with Flex 4.0, and it still does not have a spark-only datefield and datechooser. I found, that in most of my projects the MX Alert, datechooser & datefield were the only MX components. Tink has made a really good Alert for Spark, and Alex Harui has made a Spark datechooser, which functions almost OK, but its skin is very ugly.

So i decided to make a usable DateChooser from Alex's component - after a while i found out, that i needed to rewrite most of the source.
So with this component you'll be able to get rid of the MX framework, making the size of your application several hundred KBs smaller. And it functions on mobile too (i guess... havent tested it).
I have only implemented a few functions from the MX component (for example you cant select a range or you cant use styles) - but on the good side the code is really simple, so you will have an easy time to extend it.
An example:

Download source.


  1. Lovely work, I stumbled upon Alex's component as well, and you did a good job aligning everything.

    I did mess up with it a bit as well, trying to get most of the basic features back, but I am stuck on the "today" day which is always selected in the mx component. Do you have any idea how this can be done?

    Thanks i nadvance!

  2. The easiest solution is to modify the itemrenderer (SparkDateComponentDayRenderer.mxml) to draw itself always as selected, if its data property contains the current date.

  3. Thank you, for your work, man! You save a tons of time! Realy usefull stuff! God bless you =)))

  4. Thank for your excellent skinning enhancement. It works quite well except when doing a runtime skinClass change where the labelDisplay in the DateField disappears upon the skinClass change. Note the data is actually still there but the labelDisplay itself is invisible after the skinClass change.

    I would greatly appreciate your thoughts on how to keep the labelDisplay from disappearing as I've failed in many hours of attempts.

    Many thanks