Flex Date and Time (datetime) Picker Control

I saw one of these at some point, but couldn't find it when I needed it again. Pretty simple, the control has a property called selectedDate that returns a date object represented by the selected date and time. You can also feed it a Date and it will adjust to that. It is on a 12 hour clock. It dispatches a change event (Event.CHANGE) as a new date/time is selected.

There is an Inspectable property called minuteIncrement to adjust the increment on the minute stepper. I couldn't figure out how to have double digits on the 0-9 minutes. If anybody knows how I might achieve that, please let me know.

Here's the Source

2 Responses to “Flex Date and Time (datetime) Picker Control”


  1. 1 Evan

    Thanks!
    Do you know if there’s any way I might be able to determine when a user has finished editing BOTH the date and time (without explicitly putting a “done” button on there)??
    I’m thinking of something like a “focusout” that applies to the entire control.

    Also, check out:
    http://blog.flexexamples.com/2008/11/17/wrapping-values-on-an-fxnumericstepper-control-in-flex-gumbo/
    Which would be neat for a control like this, once it’s fully baked.

  2. 2 andresmaro

    Evan, you can use the mouseDownOutside event, it works like the DateChooser DateSelect Popup. But you have to make the date selection a Popup component.

    Joel thanks in advance for this component I haven’t use it yet but it seems to fit my needs.

  1. 1 Websites tagged "datetime" on Postsaver
  2. 2 Composant Flex - Sélection de la Date et de l'Heure (DateTime) - Adobe Flex Tutorial - Tutoriaux Flex Builder, MXML, ActionScript, AS3

Leave a Reply