CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

TIWCGJQDateTimePicker - Time only format options?

by ScottWGast » 04 Sep 2014 15:47

I'm having a heck of a time getting the TIWCGJQDateTimePicker working exactly how I want.... I'm only interested in the time, not the date.

Basically, I would like the edit box format to be in HH:MM am/pm format with the picker option to display a list of times in 30 minute intervals:

12:00 AM
12:30 AM
01:00 AM
01:30 AM
...
07:00 AM
07:30 AM
...
12:00 PM
01:00 PM
...
etc, etc..

when the control is displayed, I'd like it to show with the hh:mm am/pm format

I've looked at the demo and I'm still having trouble.

Help?
TIA!
Scott
ScottWGast
 
Posts: 875
Joined: 23 May 2012 11:02

by Jorge Sousa » 04 Sep 2014 16:02

Hi Scott

But this is a DateTimePicker, not a TimePicker, how do you intend to hide the date part?
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by Jorge Sousa » 04 Sep 2014 16:08

You better put these into a combo...
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by Jorge Sousa » 04 Sep 2014 16:15

on the other hand

this add-on

http://stackoverflow.com/questions/12974697/datetimepicker-am-pm-dropdown

claims to transform a timepicker from a datetimepicker....
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by ScottWGast » 04 Sep 2014 16:17

Oh.... I checked the .TimeOnly checkbox in the DateTimePicker thinking that it would only utilize the time portion. Somehow I missed the TIWCGJQTimePicker component :\

Thanks!
Scott
ScottWGast
 
Posts: 875
Joined: 23 May 2012 11:02

by Jorge Sousa » 04 Sep 2014 17:23

Oh ok, i didn't know about that property, too much thing to get in a small head

Your're right, from

http://www.cgdevtools.com/docs/_html/IWCGJQDateTimePicker.TIWCGJQTimePickerOptions.htm

i can see this property

published property TimeOnly
Hide the datepicker and only provide a time interface.

The case changes, I'll be back to this when I take a look
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by ScottWGast » 04 Sep 2014 17:39

OK, thanks! I'll await your reply.

Best regards,
Scott
ScottWGast
 
Posts: 875
Joined: 23 May 2012 11:02

by Jorge Sousa » 05 Sep 2014 10:44

Hi Scott

It's

IWCGJQDateTimePicker1.JQTimeCustomLocal.TimeFormat:= 'HH:mm tt';

This is javascript format not Delphi
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by ScottWGast » 05 Sep 2014 14:11

Yes, I have tried that and it does format the time, but the edit box (before the picker is displayed) still shows the date in addition to the time.

In any case, I've changed the interface to a comboboxex and built the drop down list myself... so, for now, it's not an issue.

Thanks,
Scott
ScottWGast
 
Posts: 875
Joined: 23 May 2012 11:02

by Jorge Sousa » 09 Sep 2014 11:04

Hi Scott

We changed only these propertties

JQTimePickerOptions.TimeOnly = True
JQTimeCustomLocal.TimeFormat = 'HH:mm tt'

And works as expected
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

Next

Return to JQDateTimePicker

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.