CURRENT VERSION 4.4.10 revision 1
V5 UNDER CONSTRUCTION
Hi all,
New Version of AS3 Date Picker Released.
you can customize lot more things in it,
- Import Date Chooser class and event class
import nid.ui.controls.DatePicker; import nid.events.CalendarEvent;
- Customize calendar icon dynamically.
[Embed(source = "../asset/20x20_light_blue.png")]
private var icon:Class;
- Dynamic Date Chooser construction
var datePicker:DatePicker = new DatePicker();
- Set calendar icon
datePicker.icon = new icon();
- Set Week Start on Monday or Sunday
datePicker.WeekStart = "sunday";
- Set Month Names
datePicker.months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
- Set Week Names
dataPicker.days = ["MTWTFSS","SMTWTFS"];
- Set Date Format
datePicker.dateFormat = "D/M/Y"; //D,M,Y all combinations are valid
- Set system font
datePicker.font = "Tahoma";
- Set embed font
[Embed(source = "../asset/tahoma.ttf", fontWeight= "normal", fontFamily = "Tahoma")]
protected static var Tahoma:Class;
[Embed(source = "../asset/tahomaBold.ttf", fontWeight= "bold", fontFamily = "Tahoma")]
protected static var TahomaBold:Class;
datePicker.embedFonts = true;
datePicker.font = "Tahoma";
- Add Date Picker to stage
addChild(datePicker);
- Date Picker Calendar Event
datePicker.addEventListener(CalendarEvent.CHANGE, getdate);
private function getdate(e:calendarEvent):void {
trace("Date:" + e.selectedDate);
}
- everything is dynamic
you can simply change anything from code.
i’m behind the documentation of this open source project
stay tuned and enjoy

GitHub Project Page : HERE
Updated to 4.4.10 revision 1
- alwaysShowCalendar reset issue fixed
SWC 4.4.10 revision 1 download :
Date Picker 4.4.10 rv1 (93.4 KiB, 259 hits)
4.4.10 revision 1 Demo :
as3-datepicker-4.4.10-rv1-demo (168.2 KiB, 191 hits)
4.4.7 Changes
- -new method added getDateString() which will return TextField string.
- -date change event dispatch corrected.
4.4.8 Changes
- -hideOnFocusOut property added,
- default value is “true” and calendar will hide when click outside the component
- if value is false calendar will remain visible unless click on calendar icon or select a date.
4.4.9 Changes
- color properties of calendar are active now , user can set this values anytime ie before/after added to stage
- calendar icon can replace by passing a URL or a bitmap object
4.4.10 Changes
- property “alwaysShowCalendar=true/false” added
News: New Date Range Picker is released , a variant of date picker component. Try this component too…
Link : http://www.infogroupindia.com/blog/posts/770
About Nidin Vinayak
I am a software developer and my top skills are ActionScript 3.0, Adobe Flex, Adobe AIR , JavaScript and HTML5 development. At present i am working as Lead Software Engineer @ ISPG Technologies (I) Pvt Ltd, Cochin, India

#1 by NeutronTon on May 16, 2012 - 5:07 pm
very nice. Although I’m getting some syntax errors?
Symbol ‘FLabel’, Layer ‘Class Methods’, Frame 1, Line 1 1093: Syntax error.
Symbol ‘FLabel’, Layer ‘Class Methods’, Frame 1, Line 62 1093: Syntax error.
Symbol ‘FMultiTextComponent’, Layer ‘Class Methods’, Frame 1, Line 1 1093: Syntax error.
Symbol ‘FMultiTextComponent’, Layer ‘Class Methods’, Frame 1, Line 95 1093: Syntax error.
#2 by NeutronTon on May 16, 2012 - 5:13 pm
Ha! nevermind. It was leftover code from some other calendar I was trying.
#3 by infogroupadmin on May 16, 2012 - 5:56 pm
Ok, is there any other issues?
#4 by Guillermo on May 22, 2012 - 5:35 pm
Hola como puedo mantener el calendario constate sin necesidad de hacer click
#5 by infogroupadmin on May 23, 2012 - 5:04 am
Hola, “hideOnFocusOut” una nueva propiedad se añade a la versión 4.4.8 datepicker
descarga DatePicker-v4.4.8.swc, valor por defecto es cierto, se establece en false para mantener el calendario visible.
Gracias por su apoyo
#6 by Joao Lago on June 7, 2012 - 7:17 am
Hi, I’m having trouble with eastern type on the weekdays.
For example, japanese characters for weekdays are too big to fit.
Is there a way to change the font size of the week days, or at least reduce the space between characters?
Other than that, congratulations on a great date picker!
Cheers
#7 by infogroupadmin on June 7, 2012 - 9:22 am
Please send me the Japanese characters
#8 by Jose on June 20, 2012 - 3:41 pm
Very useful component.
How to change week days labels for other langs?
datePicker.weekdisplay[0]=”LMXJVSD” or
datePicker.weekname.text=”LMXJVSD”
give me an error
Thanks
#9 by Jose on June 20, 2012 - 3:59 pm
OK, I’ve found it!!!
datePicker.days=["LMXJVSD","DMXJVSL"] //Spanish
Jose
#10 by mani on July 28, 2012 - 2:14 am
Thanks!
#11 by Thijs on August 14, 2012 - 11:28 am
HI ,
I tried to change the font size from the datePicker by doing :
datePicker.fontSize(25,25,25);
but it doesn’t work.
Can you help me please?
Thanks!!
#12 by Albert Zemba on August 29, 2012 - 3:09 pm
Hello,
I integrated the date picker in my application and it works great !
I have a small problem though.. I am trying to set the:
dataPicker.WeekStart = “monday”;
but it looks like it’s not working.. It will still start the week days with Sundat.
I am using the ver 4.4.3 (I have just Flash CS4).
Any ideas on what I’m doing wrong ?
Thanks a lot !
#13 by infogroupadmin on August 30, 2012 - 5:41 am
Hi Albert Zemba,
I Just updated the date picker to 4.4.9
please try this
#14 by Carlos Vergara on August 29, 2012 - 3:40 pm
Este componente esta muy bueno, me gustaria saber si tiene alguna documentación ya que he intentado cambiar los colores sin exito.
Muchas gracias.
#15 by infogroupadmin on August 30, 2012 - 5:59 am
Hola,
Por favor, probar la última versión (4.4.9)
Sample code
dataPicker.setLabelColor = 0xffffff
dataPicker.setButtonColor = 0xffffff
dataPicker.setBackgroundColor = [0x3D3D3D, 0x333333];
dataPicker.setEnabledCellColor = 0×666666;
dataPicker.setDisabledCellColor = 0xCCCCCC;
#16 by Panel on September 5, 2012 - 9:22 am
Hello
Nice job
In my case changing ico (assagning new instance of bitmap to icon property) hides old ison, but does not show new one.
#17 by infogroupadmin on September 7, 2012 - 6:45 pm
post your code
#18 by Dima on September 16, 2012 - 5:57 pm
Great job!
Can you please help me.
I want to change font style for calendar dates i.e. “24″ to bold, also I want to change past dates text color and current date text color.
Thank you
#19 by amyflash on September 23, 2012 - 9:42 am
Great job,I need it
Also,I want to know how to change the year by input text?
Thank you very much!
#20 by Alex on November 16, 2012 - 7:25 pm
I am having an issue with the calendar loading when I test the movie, it only pops up when I use the html wrapper. is there a way to have it work when I am in debug?
Thanks
#21 by infogroupadmin on November 17, 2012 - 4:53 am
Yes you can.
check this demo swf http://www.infogroupindia.com/blog/wp_files/as3datepicker/Demo.swf
#22 by Shaun Thomson on December 9, 2012 - 4:46 pm
Hi
I only have Flash cs5, so have downloaded the src files to the dir where my project’s fla file is – the dir is named project_10 – however, I get the error:
D:\flash\project_10\nid\ui\controls\DatePicker\DateField.as, Line 1 5001: The name of package ‘nid.ui.controls.datePicker’ does not reflect the location of this file. Please change the package definition’s name inside this file, or move the file. D:\flash\project_10\nid\ui\controls\DatePicker\DateField.as
The dir structure all seems fine – would you please be able to offer some advice? Also, is this free to use, and if not, how do I go about licensing it for my fla?
Thanks for your time and help
#23 by infogroupadmin on December 9, 2012 - 5:24 pm
Hi Shaun,
If you just want to use this component simply copy paste SWC file in to this path [Flash installation dir] + Common\Configuration\Components
then restart flash IDE and check your component panel for DatePicker. you can simply drag and drop it in to your fla and this product is FREE to use and modify.
Thanks for your support
#24 by Shaun Thomson on December 10, 2012 - 12:42 am
Hi – thanks for your reply. I have added the swc to C:\Program Files (x86)\Adobe\Adobe Flash CS5\Common\Configuration\Components\DatePicker-v4.4.10.rv1.swc
- restarted Flash CS5
The component doesn’t appear. I also tried it in each of the other folders within \Components
I am happy to pay you if you are able to help me get it to work, preferably using the source files (not swc), as I need to program it to not only populate the date field, but have an external source ie gig guide editor, populate the calendar when someone clicks on a gig. I have done that with the current calendarI use, but I prefer the style of your calendar.
Thanks
#25 by josh jones on December 18, 2012 - 10:09 pm
Hi-
I love the component… Do you know if we can set the date? so that on load of data, we can set it to a starting date, rather than current date?
#26 by infogroupadmin on December 19, 2012 - 8:47 am
Hi,
You can use following method
dataPicker.selectedDate = new Date(2013,2,3,12,2,2,2);
Thanks & regards
Nidin
#27 by robert on January 3, 2013 - 5:06 pm
Hi great work, very useful and neat date picker, is it possible to restrict the dates which can be picked? i.e say only the dates from today till end of the year…
thanks
#28 by infogroupadmin on January 3, 2013 - 5:14 pm
Hi Robert,
In this version you can’t restrict dates.
i will add this feature shortly.
Thank you for your support.
#29 by Jimmy on January 31, 2013 - 1:01 pm
hi,
the component is so helpful..
but i have an issue, i got “Error #1007: Instantiation attempted on a non-constructor” because of this syntax
“datePicker.icon = new icon();
and when i disabled the statement, datepicker is showing but the month is not showing..can u help me please..
#30 by infogroupadmin on January 31, 2013 - 6:46 pm
Hi Jimmy,
Try this demo http://www.infogroupindia.com/blog/download/18/
#31 by Samantha on February 7, 2013 - 6:35 am
I have DatePicker-v4.4.swc installed (latest version didn’t seem to be working) and it seems to work okay except that there’s a time (it looks like current time) when I ask for selectedDate i.e. Tue Feb 19 01:32:42 GMT-0500 2013. How would I get it to just generate: Tue Feb 19, 2013 or even 02/19/2013? Thanks for your help
#32 by infogroupadmin on February 7, 2013 - 2:37 pm
Hi Samantha,
try this
var d:Date = datePicker.selectedDate;
trace(d.month +”/”+ d.day +”/”+ d.fullYear);
Thanks
Nidin
#33 by Brandon on February 18, 2013 - 9:06 pm
Hi Nidin,
I was looking at your project here and had one question. Is it possible to get the calendar to display when running only the .swf file? I have successfully compiled the code, and the HTML wrapper version works flawlessly. However, trying to run just the .swf files will not display the calendar. If the calendar is set to always display, it will be there, but will not receive clicks or set the date. I downloaded the demo files you provide, and the .swf file in these also will not display.
Thanks for you time.
#34 by infogroupadmin on February 19, 2013 - 2:34 am
Hi Brandon,
SWF is meant to run inside HTML wrapper. SWF alone may trigger some security errors.
What is your exact requirement?
#35 by Tom on March 7, 2013 - 8:44 am
Nadin,
I have added you control to a new project, while testing the project I get the following output errors:
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/contains()
at nid.ui.controls.datePicker::CalendarSkin/flush()
at nid.ui.controls.datePicker::CalendarSkin/Construct()
at nid.ui.controls::DatePicker()
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at nid.ui.controls::DatePicker/redraw()
at nid.ui.controls::DatePicker/draw()
at fl.core::UIComponent/callLaterDispatcher()
I am using Flash CS6
Thanks for your help
#36 by infogroupadmin on March 7, 2013 - 9:53 am
Hi Tom,
Please use this FLA http://www.infogroupindia.com/blog/download/20/
put it in src folder of demo. let me know the result.
Thank you for your support.
#37 by Rob on March 14, 2013 - 9:07 pm
Hi Nidin,
Wonderful work. Thank you for sharing.
Quick question though, how can I have the date picker automatically display the current date? I have passed the value to selectedDate but it does not show on screen.
Thanks!
#38 by infogroupadmin on March 15, 2013 - 6:16 am
Hi Rob,
It supposed to work. did you checked demo files?. if not please go through it.
Thanks for your support.
#39 by Brent on May 8, 2013 - 9:12 pm
Hello,
I just have two questions.
1. What type of licensing does this have? I’d like to use it in commercial applications.
2. What is the most recent version of this that is compatible with Flash Player 10?
Thanks
#40 by infogroupadmin on May 9, 2013 - 1:09 am
Hi Brent,
ans 1 : http://www.mozilla.org/MPL/1.1/
ans 2 : 4.4.10.rv1
Thanks
#41 by Brent on May 9, 2013 - 12:10 pm
Hi,
Thanks for the reply. I’ve looked up the MPL 1.1 license and I think I understand it. Just to check, does it mean that if I just use the date picker in my commercial application (Without making any changes or modifications to the Date Picker code) then the only things I have to do are:
1. Link back to you in an obvious spot on my commercial application, and
2. Include a copy of the MPL 1.1 license to my client?
Thanks
#42 by infogroupadmin on May 9, 2013 - 12:34 pm
Yes exactly, You may include the library and licence information in your about section of the application.
Thanks