inkwai inkwai - 4 years ago 223
Javascript Question

Trigger function when date is selected with jQuery UI datepicker

How can I trigger onSelect event when I select a selected date on jQuery UI datepicker?

Answer Source

Working demo : http://jsfiddle.net/YbLnj/

Documentation: http://jqueryui.com/demos/datepicker/

code

$("#dt").datepicker({
    onSelect: function(dateText, inst) {
        var date = $(this).val();
        var time = $('#time').val();
        alert('on select triggered');
        $("#start").val(date + time.toString(' HH:mm').toString());

    }
});
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download