I need to implement a multi dates calendar. I tried to follow this example : /
Unfortunately this is not working, no error displayed on the console. Nothing happens. I probably forgot something.
Thanks in advance for your help. My code is as shown below.
Included js files.
<script type="text/javascript" src="jsCalendar/jquery-1.7.2.js"></script>
<script type="text/javascript" src="jsCalendar/jquery.ui.core.js"></script>
<script type="text/javascript" src="jsCalendar/jquery.ui.datepicker.js"></script>
<script type="text/javascript" src="jsCalendar/jquery-ui.multidatespicker.js"></script>
Code inside the script tag to initialize the multiDatesPicker instance.
<script type="text/javascript">
$("#date").multiDatesPicker();
$("#btnRepercute").click(function () {
$("#date").multiDatesPicker("show");
});
</script>
HTML to bind the multiDatesPicker instance.
<input type="button" value="Répercuter" class="button" id="btnRepercute"/>
<input type="text" id="date" class="hidden" />
PS: i need the simplest usage
I need to implement a multi dates calendar. I tried to follow this example : http://multidatespickr.sourceforge/
Unfortunately this is not working, no error displayed on the console. Nothing happens. I probably forgot something.
Thanks in advance for your help. My code is as shown below.
Included js files.
<script type="text/javascript" src="jsCalendar/jquery-1.7.2.js"></script>
<script type="text/javascript" src="jsCalendar/jquery.ui.core.js"></script>
<script type="text/javascript" src="jsCalendar/jquery.ui.datepicker.js"></script>
<script type="text/javascript" src="jsCalendar/jquery-ui.multidatespicker.js"></script>
Code inside the script tag to initialize the multiDatesPicker instance.
<script type="text/javascript">
$("#date").multiDatesPicker();
$("#btnRepercute").click(function () {
$("#date").multiDatesPicker("show");
});
</script>
HTML to bind the multiDatesPicker instance.
<input type="button" value="Répercuter" class="button" id="btnRepercute"/>
<input type="text" id="date" class="hidden" />
PS: i need the simplest usage
Share edited Dec 15, 2014 at 13:26 Superman 8812 gold badges13 silver badges31 bronze badges asked Jun 11, 2013 at 12:16 BYUBYU 731 silver badge13 bronze badges3 Answers
Reset to default 5You forgot to call the code when the document is ready.
Put your Javascript code in between those:
$(document).ready(function(){
/* YOUR CODE HERE */
});
Wrap your code in document ready
$(document).ready(function(){
------your code-----
});
see: Why wrap code into 'document ready'
<script type="text/javascript">
$(document).ready(function(){
$("#date").multiDatesPicker();
$("#btnRepercute").click(function () {
$("#date").multiDatesPicker("show");
});
});
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742295993a4417127.html
评论列表(0条)