Highlight dates in specific range with jQuery's datepicker

后端 未结 7 1446
余生分开走
余生分开走 2020-11-27 19:06

I need to highlight the dates between a start date and an end date, which I should be able to specify. Can anyone help me?

7条回答
  •  难免孤独
    2020-11-27 19:38

    Here's a working example! You will nees to make a package from here with http://jqueryui.com/download with core, widget and datepicker.

    The javascript part to put before :

    
    

    The HTML part:

    Add somewhere this CSS:

        td.highlight {border: none !important;padding: 1px 0 1px 1px !important;background: none !important;overflow:hidden;}
    td.highlight a {background: #99dd73 url(bg.png) 50% 50% repeat-x !important;  border: 1px #88a276 solid !important;}
    

    And you will need to make a small image called bg.png to make it work

提交回复
热议问题