Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 581
inkwai Avatar asked Jul 23 '12 10:07

inkwai


1 Answers

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());      } }); 
like image 135
Tats_innit Avatar answered Sep 23 '22 03:09

Tats_innit