Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
907 views
in Technique[技术] by (71.8m points)

jquery - Get datepicker value using jQueryUI

Using the jQuery UI, how can I get the value of the date picker in the http post when it's used like this within a form:

<div id="datepicker"></div>
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
$('#datepicker').datepicker({
    onSelect: function(dateText, inst) {
      $("input[name='something']").val(dateText);
    }
});

Here's a fiddle: http://jsfiddle.net/jensbits/9hbmy/338/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...