I am using jQuery UI datepicker and I want to display additional text inside date cells next to the date. This is the desired behavior:
Unfortunately, manipulating date cells using .text()
and .html()
functions breaks the datepicker functionality. See following demo and try to use the datepicker. Notice that when you select a date (i) the custom text is gone (ii) changing months destroys the calendar and lands you on "undefined NaN" month:
https://jsfiddle.net/salman/aLdx4L0y/
Is there a solution?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…