Free AS3 Date chooser/Date Picker Component v4


PROJECT UNDER MAINTENANCE

Hi all,

New Ver­sion of AS3 Date Chooser Released.

This movie requires Flash Player 9

you can cus­tomize lot more things in it,

  1. Import Date Chooser class and event class
  2. import nid.utils.dateChooser.DateChooser;
    import nid.events.calendarEvent;
  3. Cus­tomize cal­en­dar icon dynamically.
  4. [Embed(source = "../asset/20x20_light_blue.png")]
         private var icon:Class;
  5. Dynamic Date Chooser construction
  6. var dateChooser:DateChooser = new DateChooser();
  7. Set cal­en­dar icon
  8. dateChooser.icon = new icon();
  9. Set Week Start on Mon­day or Sunday
  10. dateChooser.WeekStart = "sunday";
  11. Set Month Names
  12. dateChooser.Months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
  13. Set Date Format
  14. dateChooser.dateFormat = "D/M/Y"; //D,M,Y all combinations are valid
  15. Set sys­tem font
  16. dateChooser.font = "Tahoma";
  17. Set embed font
  18. [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;
    
    dateChooser.embedFonts = true;
    dateChooser.font = "Tahoma";
  19. Add Date Chooser to stage
  20. addChild(dateChooser);
  21. Date Chooser Event
  22. dateChooser.addEventListener(calendarEvent.CHANGE, getdate);
    private function getdate(e:calendarEvent):void {
    	trace("Date:" + e.selectedDate);
    }
  23. every­thing id dynamic :) you can sim­ply change any­thing from code.

i’m behind the doc­u­men­ta­tion of this open source project

stay tuned and enjoy

DOWNLOAD SOURCE FILE: AS3-Date-Chooser-v4 (602)

DOWNLOAD SWC FILE : AS3-DateChooser-SWC file (384)

DOWNLOAD EXAMPLE FILE : AS3-DateChooser-example (448)

GOOGLE PROJECT PAGE : HERE

Bookmark and Share
VN:F [1.9.3_1094]
Rat­ing: 5.0/5 (1 vote cast)
VN:F [1.9.3_1094]
Rat­ing: +1 (from 1 vote)
Free AS3 Date chooser/Date Picker Com­po­nent v4, 5.0 out of 5 based on 1 rating

, , , ,

  1. #1 by matt on March 8, 2010 - 3:33 PM

    This is fantastic.…a huge time saver!

    VA:F [1.9.3_1094]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.3_1094]
    Rating: 0 (from 0 votes)
  2. #2 by jojo on March 29, 2010 - 8:10 PM

    Works great. Thanks!

    any hint on how to trans­late it?

    VA:F [1.9.3_1094]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.3_1094]
    Rating: 0 (from 0 votes)
  3. #3 by nidinthb on March 29, 2010 - 8:15 PM

    you mean lan­guage translate ?

    VN:F [1.9.3_1094]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.3_1094]
    Rating: 0 (from 0 votes)
  4. #4 by Milfont on April 7, 2010 - 2:39 PM

    Good work nid! Just one ques­tion, how i change the date textfield background?

    VA:F [1.9.3_1094]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.3_1094]
    Rating: 0 (from 0 votes)
    • #5 by nidinthb on April 7, 2010 - 9:18 PM

      hi,
      please down­load the updated source, one bug has fixed updated SWC will avail­able soon
      var dateChooser:DateChooser = new Dat­e­Chooser();
      dateChooser.dateField.fieldColor = 0xcccccc;
      addChild(dateChooser);

      VN:F [1.9.3_1094]
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.3_1094]
      Rating: 0 (from 0 votes)
  5. #6 by nidinthb on April 7, 2010 - 9:19 PM

    dfgdfgdfdgfgdgd
    dfgdfgdfdgfgdgd
    dfgdfgdfdgfgdgd
    dfgdfgdfdgfgdgd
    dfgdfgdfdgfgdgd

    VN:F [1.9.3_1094]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.3_1094]
    Rating: 0 (from 0 votes)
  6. #7 by nidinthb on April 7, 2010 - 9:19 PM

    dfgdfgdfdgfgdgd
    dfgdfgdfdgfgdgd
    dfgdfgdfdgfgdgd
    dfgdfgdfdgfgdgd
    dfgdfgdfdgfgdgd

    VN:F [1.9.3_1094]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.3_1094]
    Rating: 0 (from 0 votes)
  7. #8 by Milfont on April 8, 2010 - 6:06 PM

    How do I trans­late the months and the days names?

    VA:F [1.9.3_1094]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.3_1094]
    Rating: 0 (from 0 votes)
    • #9 by nidinthb on April 8, 2010 - 7:36 PM

      i don’t under­stand what you mean by translate

      VN:F [1.9.3_1094]
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.3_1094]
      Rating: 0 (from 0 votes)
      • #10 by Milfont on April 9, 2010 - 6:58 PM

        I want to show the months in my lan­guage wich is por­tuguese, so April should be Abril. Thx in advance for the support =]

        VA:F [1.9.3_1094]
        Rating: 0.0/5 (0 votes cast)
        VA:F [1.9.3_1094]
        Rating: 0 (from 0 votes)
        • #11 by NiDiN on April 9, 2010 - 9:21 PM

          please update source code and swc
          var dateChooser:DateChooser = new Dat­e­Chooser();
          dateChooser.Months = [“Jan”, “Feb”, “Mar”, “Apr”, “May”, “Jun”, “Jul”, “Aug”, “Sep”, “Oct”, “Nov”, “Dec”];
          addChild(dateChooser);

          VN:F [1.9.3_1094]
          Rating: 0.0/5 (0 votes cast)
          VN:F [1.9.3_1094]
          Rating: 0 (from 0 votes)
          • #12 by Milfont on April 12, 2010 - 6:41 PM

            Thank you NiDiN it works great… Is there a sim­i­lar way to change the week days (S, M, T, W, T, F, S)?

            VA:F [1.9.3_1094]
            Rating: 0.0/5 (0 votes cast)
            VA:F [1.9.3_1094]
            Rating: 0 (from 0 votes)
          • #13 by NiDiN on April 12, 2010 - 8:22 PM

            dateChooser.WeekStart = “sun­day”;
            OR
            dateChooser.WeekStart = “monday”;

            there are only two options now

            VN:F [1.9.3_1094]
            Rating: 0.0/5 (0 votes cast)
            VN:F [1.9.3_1094]
            Rating: 0 (from 0 votes)
          • #14 by Milfont on April 13, 2010 - 7:42 PM

            I guess you got me wrong, what I mean is the same thing that you did with the months, I need to trans­late the days of the weeks as well. Instead of (S, M, T, W, T, F, S) it should be (D, S, T, Q, Q, S, S) in por­tuguese. Keep up the good work!
            Best regards,
            Milfont

            VA:F [1.9.3_1094]
            Rating: 0.0/5 (0 votes cast)
            VA:F [1.9.3_1094]
            Rating: 0 (from 0 votes)
  8. #15 by digitaloranges on April 19, 2010 - 2:07 PM

    Hello, great work!

    How­ever, the .swc doesn’t seem to let me set the date­For­mat at all? I need to set the out­put to DD/MMM/YYYY and althought the docs say I can, it seems that that prop­erty isn’t available!

    VA:F [1.9.3_1094]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.3_1094]
    Rating: 0 (from 0 votes)
    • #16 by NiDiN on April 22, 2010 - 2:41 PM

      hi,
      var dateChooser:DateChooser = new Dat­e­Chooser();
      dateChooser.dateFormat = “D/M/Y”; // avail­able com­bi­na­tions and syn­tax
      dateChooser.dateFormat = “D/Y/M”;
      dateChooser.dateFormat = “Y/D/M”;
      dateChooser.dateFormat = “Y/M/D”;
      dateChooser.dateFormat = “M/Y/D”;
      dateChooser.dateFormat = “M/D/Y”;

      VN:F [1.9.3_1094]
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.3_1094]
      Rating: 0 (from 0 votes)
  9. #17 by Boombar on April 22, 2010 - 10:35 AM

    If you want to replace / with some­thing else just add this two lines:

    var str:String = e.selectedDate;
    var newStr:String = str.split(“/”).join(“.”);

    For eg. e.selectedDate will trace 1/4/2010, and new­Str will trace 1.4.2010

    P.S. Thanks for the com­po­nent, it works great.

    This is use­ful for me because I take the date value and name the file after it, so I have to replace / since it is not allowed sym­bol in the file name.

    VA:F [1.9.3_1094]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.3_1094]
    Rating: 0 (from 0 votes)
    • #18 by NiDiN on April 22, 2010 - 2:43 PM

      Hi,
      reduce it to sin­gle line :)
      var str:String = String(e.selectedDate).split(“/”).join(“.”);

      VN:F [1.9.3_1094]
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.3_1094]
      Rating: 0 (from 0 votes)
  10. #19 by Boombar on April 22, 2010 - 11:15 AM

    dateChooser.dateFormat = “D/M/Y”;

    This is not work­ing for me, and I got the lat­est DateChooser-V4.swc

    1119: Access of pos­si­bly unde­fined prop­erty date­For­mat through a ref­er­ence with sta­tic type nid.components:DateChooser.

    I also noticed that there are dif­fer­ent swc files in exam­ple file and on google project page… Where is the work­ing one?

    VA:F [1.9.3_1094]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.3_1094]
    Rating: 0 (from 0 votes)
    • #20 by NiDiN on April 22, 2010 - 3:23 PM

      Hi Boom­bar ,
      thanks for your feed­back and sup­port
      i will check the SWC issue and date­For­mat and update the asap

      VN:F [1.9.3_1094]
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.3_1094]
      Rating: 0 (from 0 votes)
  11. #21 by NiDiN on April 22, 2010 - 3:26 PM

    hi,
    i think i upload old SWC
    i will check the SWC and upload lat­est one shortly

    VN:F [1.9.3_1094]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.3_1094]
    Rating: 0 (from 0 votes)
  12. #22 by beanbag on May 8, 2010 - 12:06 PM

    How much does this add to the swf file size? Looks good.

    VA:F [1.9.3_1094]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.3_1094]
    Rating: 0 (from 0 votes)
    • #23 by NiDiN on May 8, 2010 - 12:14 PM

      28.6kb

      VN:F [1.9.3_1094]
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.3_1094]
      Rating: 0 (from 0 votes)
  13. #24 by Andy on June 17, 2010 - 2:51 AM

    This is a great component,

    How could I store the date selected in a share­dOb­ject?
    Basi­cally I need to know what the Date(); vari­able is so I can store it and reload the selected date next time the swf loads. Thanks in advance.

    VA:F [1.9.3_1094]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.3_1094]
    Rating: 0 (from 0 votes)
    • #25 by NiDiN on June 17, 2010 - 8:34 PM

      i couldn’t under­stand your require­ment
      could you please explain in detail.

      VN:F [1.9.3_1094]
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.3_1094]
      Rating: 0 (from 0 votes)
(will not be published)