views:

175

answers:

3

Does anyone know if it is possible to use the jQuery UI Datepicker, and when clicking on a date, set the document.location to that date, appended to a preset URL?

So, if I clicked on one of the dates, it might direct me to:

http://www.mysite.com?date=2009-10-25

I need to just use this as a quick way to quickly navigate my website calendar.

Ideas?

A: 

Just give it an onSelect function to call.

Pointy
Ok, stupid me. Thanks.
Nic Hubbard
A: 

I assume you download datapicker from Jqueryui.com with examples so you can get choosen date from callendar with:

$('#datepicker').val()

so paste it in onclick() function or onchane()

wadziu
A: 

I did small example, it works for me just change date format :)

  $().ready(function()
      {  
       $('#datepicker').click
            ( function()
             {
             window.location.replace("http://www.mysite.com/?date=" + $('#datepicker').val());
             }
            );
      }
    );
wadziu