This Blog is Moving to http://blog.drisgill.com
Viewing By Entry / Main
August 4, 2005
One of my coworkers wanted a time picker component for Flex that mimics the behavior of the Microsoft time picker (the one that shows when you double click the time in the XP tray). I figured I could build one pretty quick using the numeric stepper that comes with Flex, but this gave me a world of troubles, so I set out to make my own with text boxes and buttons (based on code found in the developers exchange from Andrew Lisse). The result is here for anyone to use for whatever they would like. All I ask is that if you make improvements you shoot me an email (randy at drisgill.com) with whatever you came up with. It allows you to select a part of the time and use my own stepper to move it up or down, you can also enter the time parts manually by typing them in. There is some validation to try to make sure you entered a valid time part. Lastly, its a 12 hour time picker, not a 24 hour one... sorry folks.
Download TimePicker: timePicker.rar
To use it, you simply place it in the same directory as your mxml file and include it with:
<timepicker id="mytime" />
Or you can pass in now="true" and it will default to the current time:
<timepicker id="mytime" now="true" />
Or you can pass in an hour, minute, and meridian (AM or PM) to set the time:
<timepicker id="mytime" meridian="AM" minute="44" hour="4" />
Or you can use the setValue method, if that suits you better:
<button click="mytime.setValue('3','1','PM');" label="setTime" />
And finally you can get the selected time by using the getValue method:
<button click="alert(mytime.getValue());" label="getTime" />
Comments
That component sounds quite interesting!
Unfortunately the link doesn't work or the archive is broken. Maybe you cqn check this.
TIA
Unfortunately the link doesn't work or the archive is broken. Maybe you cqn check this.
TIA
Seems to work for me, tried from a couple different places. Let me know if you want me to email it to you.
Pretty interesting component but "download" does NOT work for me either...
Now it works from:
http://www.drisgill.com/index.cfm?mode=day&day=4&month=8&year=2005
But not from:
http://www.drisgill.com/index.cfm/2005/8/4/Flex-TimePicker-Component
[the one MXMAed]
Cheers, r0main
http://www.drisgill.com/index.cfm?mode=day&day=4&month=8&year=2005
But not from:
http://www.drisgill.com/index.cfm/2005/8/4/Flex-TimePicker-Component
[the one MXMAed]
Cheers, r0main
Yeah Randy, I don't get it either - I get a html file instead of the rar...
NiK
NiK
Sigh... somethings up with the link and the search engine optimization stuff. Don't have time to look at it now. The link should be:
http://www.drisgill.com/files/timepicker.rar
Sorry bout that
-rd
http://www.drisgill.com/files/timepicker.rar
Sorry bout that
-rd
I need a new computer
