Yii Framework Forum: CJuiDateTimePicker and manual entry - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

CJuiDateTimePicker and manual entry Rate Topic: -----

#1 User is offline   Maxxer 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 79
  • Joined: 23-February 11
  • Location:Lecco (LC) - Italy

Posted 07 June 2012 - 08:11 AM

I'm using some CJuiDateTimePicker widgets in my form, but I noticed that if this element is used I cannot manually change the values using keyboard, because the keypresses gets probably intercepted by the popup and so it enters whatever data it wants, changing my inputs.

I've worked around this by displaying the popup only when clicking the calendar button, but I'd like to understand if there's a better way to fix this.

I added these parameters to the option array:
'showOn'=>'button',
'buttonImageOnly'=>'true',
'buttonImage'=>Yii::app()->theme->baseUrl.'/images/small_icons/calendar.png',

YetOpen S.r.l. - Your Open Source Partner
Lecco - Italy
http://www.yetopen.it
0

#2 User is offline   littleklein 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 05-May 12
  • Location:Slovakia

Posted 07 June 2012 - 08:46 AM

Probably the same issue as I reported yesterday...

http://www.yiiframew...ing-text-field/
0

#3 User is offline   huanito 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 48
  • Joined: 21-November 10

Posted 08 June 2012 - 08:17 PM

View Postroboklein, on 07 June 2012 - 08:46 AM, said:

Probably the same issue as I reported yesterday...

http://www.yiiframew...ing-text-field/


I have been struggling with that this afternoon myself. After a little research I found that the javascript addon version in the extension (Version 0.9.4-dev) is several revs behind the latest version (Version 0.9.9) on Trent Richardson's site:timepicker
Did a quick diff of the two versions but there were quite a few changes , mostly additional options, so I decided to try overwriting the old js extension asset file, clearing assets with that file listed and testing. Voila! it just worked. Now when you manually enter a date the pop-up calendar changes also.
That the most testing I've done so Caveat Emptor!

Guess I now need to find out how to update this really great widget.
0

#4 User is offline   Maxxer 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 79
  • Joined: 23-February 11
  • Location:Lecco (LC) - Italy

Posted 09 June 2012 - 12:08 AM

View Posthuanito, on 08 June 2012 - 08:17 PM, said:

Guess I now need to find out how to update this really great widget.

Just add a comment to the extension page!

thanks for your testing!
YetOpen S.r.l. - Your Open Source Partner
Lecco - Italy
http://www.yetopen.it
0

#5 User is offline   jinmmd 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 03-November 10

Posted 21 August 2012 - 08:55 PM

View Posthuanito, on 08 June 2012 - 08:17 PM, said:

I have been struggling with that this afternoon myself. After a little research I found that the javascript addon version in the extension (Version 0.9.4-dev) is several revs behind the latest version (Version 0.9.9) on Trent Richardson's site:timepicker
Did a quick diff of the two versions but there were quite a few changes , mostly additional options, so I decided to try overwriting the old js extension asset file, clearing assets with that file listed and testing. Voila! it just worked. Now when you manually enter a date the pop-up calendar changes also.
That the most testing I've done so Caveat Emptor!

Guess I now need to find out how to update this really great widget.


Thanks for updated that extension, but where can I get your edition?
0

#6 User is offline   huanito 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 48
  • Joined: 21-November 10

Posted 22 August 2012 - 01:25 AM

View Postjinmmd, on 21 August 2012 - 08:55 PM, said:

Thanks for updated that extension, but where can I get your edition?

Sorry I don't have the ability to add an edition and the original owner has not updated for a year now so if you want it anytime soon you need to make your own version.
The key to do this is to overwrite the js extension asset file
extensions/CJuiDateTimePicker/assets/jquery-ui-timepicker-addon.js
with an updated version from Trent Richardson's site mentioned above, clearing assets and test how it works. Good luck.
p.s. looking at Trent's site I see that the addon in now at "Version 1.0.1 * Last Modified: 07/01/2012" so you might want to try that to see if it works even better than 0.9.9 I tried back in june.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users