How can I disable month selection in the jQuery datepicker?

后端 未结 4 831
遇见更好的自我
遇见更好的自我 2020-12-10 07:08

I am trying disable the left/right buttons that allow the user to change months. I\'ve removed the drop down list of months but can\'t get rid of the buttons.



        
4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-10 07:44

    I don't know how to do it directly in jQuery (or if it's possible).

    But if you can't find a way to do it in there, you could always just hide the buttons in css.

    The css selectors you want are (from memory so you might need to check)

    .ui-datepicker .ui-datepicker-prev, 
    .ui-datepicker .ui-datepicker-next
    {
        display:none;
    }
    

提交回复
热议问题