有没有一种简单的方法可以将自定义类添加到jQuery-ui Datepicker的所有元素中

Is there an easy way to add a custom class to all of the elements of the jQuery-ui Datepicker?

本文关键字:添加 jQuery-ui Datepicker 元素 自定义 一种 简单 有没有 方法      更新时间:2023-09-26

长话短说,有没有办法将某个类添加到日期选择器的每个元素中?(我说的是所有的跨度,TD,一切)。我想添加类以防止我的上下文菜单在使用日期选择器时隐藏。(每当我单击没有特定类的元素时,CM 都会隐藏)

像这样:

$('#ui-datepicker-div *').addClass('myclass');

虽然效率不是很高,但我建议您检查其他路线以达到预期的结果。