Alex Rivera | Logout

Get datepicker value using jQueryUI

Asked 2011-07-12T15:51:17.183
18

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>
Edit
Report

1 Answer

2

You should tie the datepicker to a form input instead of a div, so the value in the input will be submitted back with the form.

<input type="text" id="datepicker"></div>

<script>
    $(function () {
        $('#datepicker').datepicker();
    });
</sript>
answered 2011-07-12T15:57:49.240

Your Answer