Flex TimeEntry Component

SM_TimeEntry is a custom Flex controls that allows a user to quickly and easily enter a valid time into your applications. It supports multiple styling options, text sizing, 12 and 24 hour format, and keyboard interaction too.

View Here

Comments
This is very good!! Thank you. :-)
# Posted By mike | 2/8/07 10:38 AM
I think this is a great component, but I have found a small bug in it. When you are using it in 12-hour and you set the hour,
minute and am_pm variables, the time displays "0:00:00 am". The minute actually does display correctly.

For example, I am populating the component with the current system time. So, if the system time is 12:15 am, and I set the
hour, minute and am_pm properties appropriately, the time displayed in the component shows 0:15:am.

I tried using your example webpage that shows how the component works. The 2 12-hour examples displayed the same bug.
# Posted By Scott Trapp | 9/20/07 10:05 PM
I've had your zip on my desks for months because I knew that sooner or later I'd need it. Sure nuff, I needed a component that would give me both date and time. I added month, day, and year to it by following your code and voila! Way cool, thank you. Now, I'm making another one that does IP addresses -- just in case.
# Posted By Dan Nall | 11/20/07 2:47 PM
You can fix the 12-hour default display problem by adding one line of code to the formatText function.

if(theField == 'hourText' && !is24Hour)
{
return value;
}

should be...

if(theField == 'hourText' && !is24Hour)
{
if(value == "0") { value = "12"; }
return value;
}

The default display for 12-hour time fields will then be 12:00 am instead of 0:00 am.
# Posted By chris | 3/4/08 11:52 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.005.