简体   繁体   中英

How to use bootstrap-datepicker on Bootstrap Modal?

I am trying to use bootstrap-datepicker on bootstrap modal ; I have render HTML by Razor Code @Html.TextBoxFor() .

But Datepicker does not show.

Please help me.

Add your script

<script type="text/javascript">
    $(function() {
        $(".datepicker").datepicker();
    });
</script>

And set your textbox

@Html.TextBoxFor(m => m.xxx, new {@class = "form-control datepicker" , @id = "datepicker" })

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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