Skip to content Skip to sidebar Skip to footer

Jquery Ui Datepicker, Onclick Of A Date , Get The Date And Pass To Url

I have a jquery UI datepicker calendar in an event page(sharepoint page). $('#datepicker').datepicker(); I need to get the date once user clicks on any date and get that date an

Solution 1:

try

$('#datepicker').datepicker({
    onSelect: function(dateText, inst) { 
        window.location = 'http://mysite/events/Pages/default.aspx?dt=' + dateText;
    }
});

uses the onSelect event (documented here)

Allows you to define your own event when the datepicker is selected. The function receives the selected date as text and the datepicker instance as parameters. this refers to the associated input field.

Post a Comment for "Jquery Ui Datepicker, Onclick Of A Date , Get The Date And Pass To Url"