【问题标题】:jQuery UI datepicker output in a field字段中的 jQuery UI datepicker 输出
【发布时间】:2015-04-28 21:14:44
【问题描述】:

我想创建一个在 jQueryUI 日期选择器上显示所选日期的字段。我该怎么做?

得到以下代码:

Javascript:

        $(function () {
        $("#datepicker").datepicker({
            inline: true,
            onSelect: function () {
                $('#date').val(this.value)
            }
        });
    });

还有HTML:

<div id="datepicker"></div>

            <br>
            <p><input id = "date">

它现在正在工作。感谢大家的帮助!

【问题讨论】:

标签: javascript jquery html jquery-ui-datepicker


【解决方案1】:
var currentDate = $("#datepicker").datepicker( "getDate" );

在您的代码中更改此行。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-08-06
    • 1970-01-01
    • 1970-01-01
    • 2016-11-18
    • 1970-01-01
    • 2011-05-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多