so what I'm trying to do is to make a popup calendar by textbox by using datepicker. the problem that I faced is the calendar doesn't popup at all .
below is my code:
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
<script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script type ="text/javascript" >
// <script type="text/javascript" language="javascript">
$(function () {
//initialise the datepicker with the date format specified
$(".datepicker").datepicker();
</script>
next:
<input id="txtSche1" type="text" CssClass="datepicker" readonly="readonly"/>
so I try other method but but this time I'm using image button and it worked
$(function () {
$("[id$=txtSche1]").datepicker({
showOn: 'button',
buttonImageOnly: true,
buttonImage: '../images/PopUpSmallCalendar.gif',
});
});
I also remove the class from the text input
<input id="txtSche1" type="text" readonly="readonly"/>
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.