Page 1 of 2

TIWCGJQDateTimePicker - Time only format options?

PostPosted: 04 Sep 2014 15:47
by ScottWGast
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

Re: TIWCGJQDateTimePicker - Time only format options?

PostPosted: 04 Sep 2014 16:02
by Jorge Sousa
Hi Scott

But this is a DateTimePicker, not a TimePicker, how do you intend to hide the date part?

Re: TIWCGJQDateTimePicker - Time only format options?

PostPosted: 04 Sep 2014 16:08
by Jorge Sousa
You better put these into a combo...

Re: TIWCGJQDateTimePicker - Time only format options?

PostPosted: 04 Sep 2014 16:15
by Jorge Sousa
on the other hand

this add-on

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

claims to transform a timepicker from a datetimepicker....

Re: TIWCGJQDateTimePicker - Time only format options?

PostPosted: 04 Sep 2014 16:17
by ScottWGast
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

Re: TIWCGJQDateTimePicker - Time only format options?

PostPosted: 04 Sep 2014 17:23
by Jorge Sousa
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

Re: TIWCGJQDateTimePicker - Time only format options?

PostPosted: 04 Sep 2014 17:39
by ScottWGast
OK, thanks! I'll await your reply.

Best regards,
Scott

Re: TIWCGJQDateTimePicker - Time only format options?

PostPosted: 05 Sep 2014 10:44
by Jorge Sousa
Hi Scott

It's

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

This is javascript format not Delphi

Re: TIWCGJQDateTimePicker - Time only format options?

PostPosted: 05 Sep 2014 14:11
by ScottWGast
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

Re: TIWCGJQDateTimePicker - Time only format options?

PostPosted: 09 Sep 2014 11:04
by Jorge Sousa
Hi Scott

We changed only these propertties

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

And works as expected