jQuery UI datepicker help

Soldato
Joined
4 Jan 2004
Posts
7,774
Location
Nottingham
Hey Guys

I've got the datepicker setup on a page and I want to set a <p> tag to the current date when the page loads but I'm having some trouble getting it working. I've setup the onSelect Event to change the contents of the <p> tag to show the date from what ever day was clicked on, this works great and is formatted as D, d M yy:

Mon, 20 Apr 2009

I've tried using the getDate method which does get the current date but I can't seem to format this to D, d M yy. Instead it displays:

Mon Apr 20 2009 00:00:00 GMT+0100 (GMT Daylight Time)

Can anyone offer any suggestions?
 
unfortunately not :(

I've allready got the date format set (thats how I have the onSelect event to output D, d M yy, by using dateFormat: 'D, d M yy') but it doesnt seem to have any effect on the getDate method
 
Try parseDate on the value you get from getDate().

Also: hi. Ony day I will get around to messaging you on MSN again.
- Andrew (who you went to Uni with :p)
 
Dude! I had no idea you were on OcUK? :p

I'll give the parseDate a go. not sure how I missed that, both me and Ben missed it! lol
 
Back
Top Bottom