How to highlight dates in JQM-DateBox calendar using javascript code

前端 未结 3 1310
面向向阳花
面向向阳花 2021-01-27 08:19

how to highlight cells in calendar with two different colors, i.e. some cells in RED and the others in GREEN .. using JavaScript

some code

javascr

3条回答
  •  一向
    一向 (楼主)
    2021-01-27 08:32

    For highlighting cells in a calendar (eg. making some Red and others Green) I have found the calFormatter callback to be much more flexible than using highDates or highDatesAlt. Part of the reason it's better is because the callback works for all visible dates, even ones just outside the current month. It also can override the highlighting of the current or selected dates if you want.

    Details about how to use the callback can be found here: https://jtsage.dev/DateBox/api/calFormatter/

提交回复
热议问题