On Jul 24, 2010, at 3:24 PM, storitel wrote:

after further reading i've learned that yy means four digit year for
dateFormat in jQuery ... so to get a date like 30/09/10 my desired
format is

<def tag="input" for="Date">
 <hjq-datepicker dateFormat="dd/mm/y" merge/>
</def>

this allows dates to be correctly generated in both firefox and IE ...
so my remaining issues are
- sometimes the datepicker popup doesn't appear on IE (actually the
autocompleter sometimes fails to appear too...)

Is this on IE8? I've had some intermittent issues with jQuery vs. Prototype vs. IE8; some really weird stuff where event handlers don't get attached, but hitting Reload makes the page work the second time around. I also had to roll my prototype.js file back to 1.6.0.3, as the newer version didn't get along with IE8+jQuery well at all. This was a few months back, so it's possible they've fixed it in a newer release. The IE8 event handler issue above actually vanished after a recent Windows Update a few weeks ago, or I'd try to reproduce it...

FWIW, I've got a couple working apps in the wild with these versions:

Prototype 1.6.0.3
jQuery 1.4.2
jQueryUI 1.8

- i still don't understand why dates appear in on load in edit forms
as YYYY-MM-DD

The problem is that the text field is filled by passing in 'this'; so what ends up in the field is the result of to_s.

If you add this to an initializer (I always have one called date_formats.rb:

Date::DATE_FORMATS[:default] = "%d/%m/%y"

Then it should start out with the correct format. This should probably be handled by hjq-datepicker, but I'm not sure how best to do it short of re-implementing the date parser...

--Matt Jones

--
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to