Friday, 16 August 2013

Bootstrap Datepicker with Asp.Net Textbox

Bootstrap Datepicker with Asp.Net Textbox

Maybe it will be a silly question but i couldnt handle my problem.i check
all the questions and answers on here but i didnt find any clue. anyways ,
i want to use bootstrap datepicker with asp.net textbox.When i use it with
input without runat="server" tag i can show datepicker but when i try to
use it textbox with runat="server" datepicker is not showing. Any idea to
solve this issue?
<asp:TextBox ID="DateTextbox" runat="server" CssClass="m-wrap span12 date
form_datetime"></asp:TextBox>
<script type="text/javascript">
$(document).ready(function () {
var dp = $("#<%=DateTextbox.ClientID%>");
dp.datepicker({
changeMonth: true,
changeYear: true,
format: "dd.mm.yyyy",
language: "tr"
});
});
</script>
thanks for your answers.

No comments:

Post a Comment