I keep looking for steps in the Internet on how I can change a format of a certain date
$j("#activitycalendar").datepicker("setDate", $j.datepicker.parseDate("yy-mm-dd",$_GET.critval));
All I want to do is to set the date of a datepicker depending on what the $_GET.critval
contains. And the $_GET.critval
contains a date in this format
2011-12-05
as the jqueryui documents says
"The new date may be a Date object or a string in the current date format (e.g. '01/26/2009')" jQuery UI - Datepicker Demos and Documentation
so I wanted to change the format of my $_GET.critval
so it can change the date of the datepicker. I tried the $j.datepicker.parseDate
but it really doesn't work. the return value of that parsing will be like this
Mon Dec 05 2011 00:00:00 GMT+0800 (Taipei Standard Time)
Is there any solution so I can format the date and set the date of the datepicker? thanks