繁体   English   中英

jQuery Ui日期选择器不起作用?

[英]Jquery Ui Date Picker Not Working?

我的表单代码在这里。

<div class="threeleft second" id='displayallformshow' style="float: none;width: 80%;padding:10px;">
    <form action="investor_submit.php">
        <div class='formdiv'>
            <div style='width:35%;margin-top:12px;'>Published :</div>
            <div style='width:41%;text-align:justify'>
                <div style="float: left;">
                    <input type="radio" name="published" id="" value='publishedyes'>
                </div>
                <div style="float: left;width: 237px;">Yes, allow users who follow links to my venture URL the ability to see my venture page.</div>
                <br>
                <br>
                <div style="float: left;">
                    <input type="radio" name="published" id="" value='publishedno'>
                </div>
                <div style='float: left;width: 237px;'>No, display an error message to anybody who tries to follow links to my venture except for me.</div>
            </div>
        </div>
        <br>
        <br>
        <div class='formdiv'>
            <div style='width:35%;margin-top:12px;'>Listed and Discoverable :</div>
            <div style='width:41%;text-align:justify'>
                <div style='float: left;'>
                    <input type="radio" name="listedanddiscoverable" id="" value='listedanddiscoverableyes'>
                </div>
                <div style='float: left;width: 237px;'>Yes, I want my ventureto be listed in the browser section making it discoverable to RockThePost Visitors. (Required Paid Subscription)</div>
                <br>
                <br>
                <div style='float: left;'>
                    <input type="radio" name="listedanddiscoverable" id="" value='listedanddiscoverableno'>
                </div>
                <div style='float: left;width: 237px;'>No, do not list my venture anywhere automatically. I willmanually invite people to my venture with my venture URL.</div>
            </div>
        </div>
        <div class='formdiv'>
            <div style='width:35%;margin-top:12px;'>Describe Start Date :</div>
            <div style='width:55%;'>
                <input class='madetextboxlong' placeholder="Enter Describe Start Date" type="text" name="describestartdate" id="describestartdate">
            </div>
        </div>
        <div class='formdiv'>
            <div style='width:35%;margin-top:12px;'>Describe end Date :</div>
            <div style='width:55%;'>
                <input class='madetextboxlong' placeholder="Enter Describe end Date" type="text" name="describeenddate" id="describeenddate">
            </div>
        </div>
        <br>
        <br>
        <br>
        <div style="margin-left: 288px;margin-top: 423px;width: 100%;" class="formdiv">
            <input type="submit" id='publishform' class="madebtnsave" name="save" value="Save" />
        </div>
    </form>
</div>

该表格我点击事件加载。 用户在加载时单击投资者选项卡。

该表格正常工作,但问题不是加载jQuery ui datepicker

这是我的日期选择器代码。

$( "#describestartdate" ).datepicker();
$( "#describeenddate" ).datepicker();

请帮助我解决该问题,如何使用jquery datepicker。

当我加载没有点击事件的表单时,日期选择器显示成功。

但我加载窗体单击事件,日期选择器未显示。

亲爱的朋友试试看。

$("event tab ID").click(function(){
     $( "#displayallformshow #describestartdate" ).datepicker();
    $( "#displayallformshow #describeenddate" ).datepicker();
});

我希望这对您有用。

如果您在click事件上加载表单,则必须注册datepicker处理程序

$( "#describestartdate" ).datepicker();
$( "#describeenddate" ).datepicker();

加载后。 将这些行放在表单加载回调(on-click事件)的末尾。 否则,将在目标项目可用之前执行这些行,即$("#describestartdate")将返回一个空列表,并且什么都不会发生。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM