php - JQuery's multiDatesPicker not working - Stack Overflow

I need to implement a multi dates calendar. I tried to follow this example :Unfortunately this is not

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 badges
Add a ment  | 

3 Answers 3

Reset to default 5

You 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

相关推荐

  • php - JQuery&#39;s multiDatesPicker not working - Stack Overflow

    I need to implement a multi dates calendar. I tried to follow this example :Unfortunately this is not

    17小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信