views:

257

answers:

3

I'm trying to integrate jquery-timepickr on my website, but no matter what version I download (trunk, latest final, latest alpha, the one from the demo site), I keep having the same problem:

I applied the time picker with the default options:

$("#MyTimeField").timepickr();

When I click on the field I bound the timepicker to, I get a vertical row of buttons saying "{label:s}". When clicking one of these buttons , the following text appears in the input field: "{h:02.d}:{m:02.d}".

My guess was that it might be some problem with the prerequisites, so I made sure that jquery.strings are jquery.utils are installed, tried various different versions of your plugin, also different jquery-ui versions, but still no luck.

Any hints would be greatly appreciated.

A: 

Looks like the strings are not being replaced - do you have link or code example?

Keir
Yes, that's what I thought too, but at least at first at first glance I had a hard time understanding the source code for the plugin. Regarding code: My code is simply $("#MyTimeField").timepickr();, the code to the plugin is available at the site I linked in my posting: http://haineault.com/media/jquery/ui-timepickr/page/#s-intro
Adrian Grigore
+2  A: 

Are you using jquery.validate plugin from here? The latest jquery.timepickr should have fixed it. See here for details.

akmathur
A: 

Looks like this has not been solved... and maybe it's too late now... but I wanted to suggest that if you're still stuck, try another picker, such as the Any+Time™ DatePicker/TimePicker AJAX Calendar Widget. I hope it will meet your needs!

Andrew M. Andrews III
Thanks for the suggestion, Andrew. The plugin looks nice, but I prefer jqurey-timepickr's button layout since it requires less space on the screen. That's important for me since I am planning to use this for a smartphone-friendly website.
Adrian Grigore
Adrian, you can change the font-size in the CSS file to result in a smaller picker, which might fit your size requirements. I have noticed that some very small or very large font sizes do have a negative impact on the layout, but with very little tweaking it is usually possible to make drastic changes to the picker's size. If you decide to give it a shot, and have any specific problems, shoot me a message and I'll be happy to try to help make it work.
Andrew M. Andrews III