Html 使用jquery日期选择器悬停时使用不同颜色高亮显示日期

Html 使用jquery日期选择器悬停时使用不同颜色高亮显示日期,html,css,datepicker,Html,Css,Datepicker,我有日期选择开始日期和结束日期。单击结束日期时,我需要用红色突出显示开始日期,移动鼠标时,我需要用黄色突出显示。单击结束日期时,它应该有所有突出显示的颜色,如图所示。但我无法更改颜色。有人能帮我解决这个问题吗 .ui小部件内容.ui状态默认值,.ui小部件标题.ui状态默认值,.ui按钮,html.ui按钮。禁用的ui状态:悬停,html.ui按钮。禁用的ui状态:活动{ 背景:0!重要; 边界:0!重要; 颜色:9c9c9c!重要; 字体大小:粗体; 文本对齐:居中!重要; 空白:无换行;

我有日期选择开始日期和结束日期。单击结束日期时,我需要用红色突出显示开始日期,移动鼠标时,我需要用黄色突出显示。单击结束日期时,它应该有所有突出显示的颜色,如图所示。但我无法更改颜色。有人能帮我解决这个问题吗

.ui小部件内容.ui状态默认值,.ui小部件标题.ui状态默认值,.ui按钮,html.ui按钮。禁用的ui状态:悬停,html.ui按钮。禁用的ui状态:活动{ 背景:0!重要; 边界:0!重要; 颜色:9c9c9c!重要; 字体大小:粗体; 文本对齐:居中!重要; 空白:无换行; 字体大小:10px; } 桌子{ 边界崩溃:崩溃!重要; 保证金:0; } .ui日期选择器多.ui日期选择器组表{ 宽度:100%!重要; } .ui-datepicker-unselectable.ui-state-default{ 显示:无; } .ui状态范围{ 背景色:FBD2D3!重要; 颜色:fff!重要; } ui日期选取器div tr td:hover*,ui日期选取器div tr td>.ui状态默认值.ui状态悬停.ui日期选取器当前日期{ 背景色:F47777C!重要; 颜色:fff!重要; 文本对齐:居中!重要; } thead::之后 { 内容:; 显示:块; 高度:1.5em; 宽度:100%; 背景:白色; } .ui日期选择器今天{ 背景色:无!重要; } .ui日期选择器td span、.ui日期选择器td a{ 文本对齐:居中!重要; } t车身{ 左边距:10px!重要; 右边距:10px!重要; } 运输署{ 边框:1px实心F6F6F6!重要; } 用户界面日期选择器分区{ 显示:无; 左:8px; 位置:绝对位置; 顶部:31px; 宽度:50%!重要; z指数:1; } .ui-datepicker-header.ui-widget-header{ 背景色:F6F6F6!重要; 边界:0!重要; 字体大小:粗体; 颜色:9c9c9c!重要; } .ui日期选择器th{ 背景色:F6F6F6!重要; 边界:0!重要; 字体大小:正常; } .低票面价值{ 颜色:326EA6; 空白:无换行; 字体大小:10px; } .lowTicketValue:激活{ 颜色:fff!重要; 空白:无换行; } .ui日期选择器.ui状态范围{ 背景:蓝色!重要; } .ui日期选择器日历。突出显示{背景色:326EA6!重要;} .ui状态范围{ 背景色:F47777C!重要; } .highTicketValue{ 颜色:F4777C!重要; } ui日期选择器分区tr td:n-child2n+1>span{ 颜色:F4777C!重要; } ui日期选择器div tr td:n-child2n+1:active>span,ui日期选择器div tr td:n-child2n+1:hover>span{ 颜色:fff!重要; } .突出显示a{ 背景色:绿色!重要; 背景图像:无!重要; 颜色:白色!重要; 字体大小:粗体!重要; 字号:12号; } $function{ $'flexibledates'。日期选择器{ 更改月份:false, 月数:2, 日期格式:“D,D MM”, dayNamesMin:[“太阳”、“星期一”、“星期二”、“星期三”、“星期四”、“星期五”、“星期六”], 显示前:功能输入,安装{ 插入消息开始日期; }, onSelect:functionselectedDate{ var selectedDate=$flexibledates.datepickergetDate; 如果选择日期!=null{ $'FlightDeviation'。日期选择器'option','minDate',selectedDate.datepicker'refresh'; } } }; $'FlightDeviation'。日期选择器{ 更改月份:false, 月数:2, 日期格式:'D,D MM', dayNamesMin:[“太阳”、“星期一”、“星期二”、“星期三”、“星期四”、“星期五”、“星期六”], 显示前:功能输入,安装{ insertMessageEndDate; }, onSelect:functionselectedDate{ $'flexibledates'.datepicker'option','maxDate',$this.datepicker'getDate';//重置最大日期 } }; 函数insertMessageStartDatemessage{ ClearTimeOutinerTMessageStartDate.timer; 如果$'ui-datepicker-div.ui datepicker calendar.ui state default'.是“:可见”{ $'.ui状态默认值',在+45555+之后; } 其他的 insertMessageStartDate.timer=SetTimeOutinerTMessageStartDate,10; } 函数insertMessageEndDatemessage{ ClearTimeOutinerTMessageEndDate.timer; //$flexibledates.datepickergetDate.css{背景色:f47777c!重要,颜色:fff!重要}; 如果$'ui-datepicker-div.ui datepicker calendar.ui state default'.是“:可见”{ $'.ui状态默认值',在+45555+之后; $ui日期选择器div tr td.clickfunction{ $this.preventil'.ui日期选择器不可选择'.css{color:red,border:2px solid red}; }; } 其他的 insertMessageEndDate.timer=SetTimeOutinerTMessageEndDate,10; } }; 您可以使用datePicker的beforeShowDay方法,并检查日期是否介于开始日期和结束日期之间

.ui小部件内容.ui状态默认值, .ui小部件标题.ui状态默认值, .ui按钮, ui按钮。ui状态已禁用:悬停, html.ui按钮。禁用的ui状态:活动{ 背景:0!重要; 边界:0!重要的 颜色:9c9c9c!重要的 字体大小:粗体; 文本对齐:居中!重要的 空白:无换行; 字体大小:10px; } 桌子{ 边界崩溃:崩溃!重要; 保证金:0; } .ui日期选择器多.ui日期选择器组表{ 宽度:100%!重要; } .ui-datepicker-unselectable.ui-state-default{ 显示:无; } .ui状态范围{ 背景色:FBD2D3!重要; 颜色:fff!重要; } ui日期选择器div tr td:hover*, ui-datepicker div tr td>.ui-state-default.ui-state-hover, .ui日期选择器当前日期{ 背景色:F47777C!重要; 颜色:fff!重要; 文本对齐:居中!重要; } thead::之后{ 内容:; 显示:块; 高度:1.5em; 宽度:100%; 背景:白色; } .ui日期选择器今天{ 背景色:无!重要; } .ui日期选择器td span, .ui日期选择器td a{ 文本对齐:居中!重要; } t车身{ 左边距:10px!重要; 右边距:10px!重要; } 运输署{ 边框:1px实心F6F6F6!重要; } 用户界面日期选择器分区{ 显示:无; 左:8px; 位置:绝对位置; 顶部:31px; 宽度:50%!重要; z指数:1; } .ui-datepicker-header.ui-widget-header{ 背景色:F6F6F6!重要; 边界:0!重要; 字体大小:粗体; 颜色:9c9c9c!重要; } .ui日期选择器th{ 背景色:F6F6F6!重要; 边界:0!重要; 字体大小:正常; } .低票面价值{ 颜色:326EA6; 空白:无换行; 字体大小:10px; } .lowTicketValue:激活{ 颜色:fff!重要; 空白:无换行; } .ui日期选择器.ui状态范围{ 背景:蓝色!重要; } .ui日期选择器日历。高亮显示{ 背景色:黄色!重要; } .ui状态范围{ 背景色:F47777C!重要; } .highTicketValue{ 颜色:F4777C!重要; } ui日期选择器分区tr td:n-child2n+1>span{ 颜色:F4777C!重要; } ui日期选择器分区tr td:n-child2n+1:active>span, ui日期选择器div tr td:n-child2n+1:hover>span{ 颜色:fff!重要; } .突出显示a{ 背景色:绿色!重要; 背景图像:无!重要; 颜色:白色!重要; 字体大小:粗体!重要; 字号:12号; } .ui红色{ 背景:红色; } .亮点{ 背景色:黄色!重要; } $function{ $'flexibledates'。日期选择器{ 更改月份:false, 月数:2, 日期格式:“D,D MM”, dayNamesMin:[“太阳”、“星期一”、“星期二”、“星期三”、“星期四”、“星期五”、“星期六”], 显示前:功能输入,安装{ 插入消息开始日期; }, beforeShowDay:functiondate{ var d=date.getTime; 如果$flexibledates.datepickergetDate&&$flightDeviation.datepickergetDate&&d<$flightDeviation.datepickergetDate.getTime&&d>$flexibledates.datepickergetDate.getTime{ 返回[true,‘ui状态突出显示’,]; }否则{ 返回[真,]; } }, onSelect:functionselectedDate{ var selectedDate=$flexibledates.datepickergetDate; 如果选择日期!=null{ $'FlightDeviation'。日期选择器'option','minDate',selectedDate.datepicker'refresh'; } } }; $'FlightDeviation'。日期选择器{ 更改月份:false, 月数:2, 日期格式:“D,D MM”, dayNamesMin:[“太阳”、“星期一”、“星期二”、“星期三”、“星期四”、“星期五”、“星期六”], 显示前:功能输入,安装{ $ui日期选择器分区td.off; $document.onMouseCenter,用户界面日期选择器分区td,函数E{ $this.parent.addClassfinalRow; $.finalRow.parents'.ui datepicker group last'.parent.find'.ui datepicker group first'.find'tr'.last.addClassfinalRowRangeOtherTable; $.finalRowRangeOtherTable.findtd:not.ui-datepicker-unselectable.addClasshighlight; $.finalRowRangeOtherTable.prevAll.findtd:not.ui-datepicker-unselectable.addClasshighlight; $.finalRow.prevAll.findtd:not.ui-datepicker-unselectable.addClasshighlight; $this.prevAlltd:not.ui-datepicker-unselectable.addClasshighlight; }; $document.onmouseleave,用户界面日期选择器分区td,函数E{ $this.parent.removeClassfinalRow; $ui datepicker div td.removeclassphighlight; $.finalRowRange.removeClassfinalRowRange.find'.highlight'.removeClasshighlight; $.finalRowRangeOtherTable.removeClassfinalRowRangeOtherTable.find'.highlight'.removeClasshighlight; }; insertMessageEndDate; }, beforeShowDay:functiondate{ var d=date.getTime; 如果$flexibledates.datepickergetDate&&d==$flexibledates.datepickergetDate.getTime{ 返回[true,‘ui红色’,]; } 如果$flexibledates.datepickergetDate&&$flightDeviation.datepickergetDate&&d<$flightDeviation.datepickergetDate.getTime&&d>$flexibledates.datepickergetDate.getTime{ 返回[true,‘ui状态突出显示’,]; }否则{ 返回[真,]; } }, onSelect:functionselectedDate{ $'flexibledates'.datepicker'option','maxDate',$this.datepicker'getDate';//重置最大日期 $ui日期选择器分区td.off; $document.onMouseCenter,用户界面日期选择器分区td,函数E{ $this.parent.addClassfinalRow; $.finalRow.parents'.ui datepicker group last'.parent.find'.ui datepicker group first'.find'tr'.last.addClassfinalRowRangeOtherTable; $.finalRowRangeOtherTable.findtd:not.ui-datepicker-unselectable.addClasshighlight; $.finalRowRangeOtherTable.prevAll.findtd:not.ui-datepicker-unselectable.addClasshighlight; $.finalRow.prevAll.findtd:not.ui-datepicker-unselectable.addClasshighlight; $this.prevAlltd:not.ui-datepicker-unselectable.addClasshighlight; }; $ui日期选择器div td.onmouseleave,函数{ $this.parent.removeClassfinalRow; $ui datepicker div td.removeclassphighlight; $.finalRowRange.removeClassfinalRowRange.find'.highlight'.removeClasshighlight; $.finalRowRangeOtherTable.removeClassfinalRowRangeOtherTable.find'.highlight'.removeClasshighlight; }; } }; 函数insertMessageStartDatemessage{ ClearTimeOutinerTMessageStartDate.timer; 如果$'ui-datepicker-div.ui datepicker calendar.ui state default'.是“:可见”{ $'.ui状态默认值',在+45555+之后; }否则 insertMessageStartDate.timer=SetTimeOutinerTMessageStartDate,10; } 函数insertMessageEndDatemessage{ ClearTimeOutinerTMessageEndDate.timer; //$flexibledates.datepickergetDate.css{背景色:f47777c!重要,颜色:fff!重要}; 如果$'ui-datepicker-div.ui datepicker calendar.ui state default'.是“:可见”{ $'.ui状态默认值',在+45555+之后; $ui日期选择器div tr td.clickfunction{ $this.preventil'.ui日期选择器不可选择'.css{ 颜色:红色, 边框:2件纯红 }; }; }否则 insertMessageEndDate.timer=SetTimeOutinerTMessageEndDate,10; } }; 您可以使用datePicker的beforeShowDay方法,并检查日期是否介于开始日期和结束日期之间

.ui小部件内容.ui状态默认值, .ui小部件标题.ui状态默认值, .ui按钮, ui按钮。ui状态已禁用:悬停, html.ui按钮。禁用的ui状态:活动{ 背景:0!重要; 边界:0!重要; 颜色:9c9c9c!重要; 字体大小:粗体; 文本对齐:居中!重要; 空白:无换行; 字体大小:10px; } 桌子{ 边界崩溃:崩溃!重要; 保证金:0; } .ui日期选择器多.ui日期选择器组表{ 宽度:100%!重要; } .ui-datepicker-unselectable.ui-state-default{ 显示:无; } .ui状态范围{ 背景色:FBD2D3!重要; 颜色:fff!重要; } ui日期选择器div tr td:hover*, ui-datepicker div tr td>.ui-state-default.ui-state-hover, .ui日期选择器当前日期{ 背景色:F47777C!重要; 颜色:fff!重要; 文本对齐:居中!重要; } thead::之后{ 内容:; 显示:块; 高度:1.5em; 宽度:100%; 背景:白色; } .ui日期选择器今天{ 背景色:无!重要; } .ui日期选择器td span, .ui日期选择器td a{ 文本对齐:居中!重要; } t车身{ 左边距:10px!重要; 右边距:10px!重要; } 运输署{ 边框:1px实心F6F6F6!重要; } 用户界面日期选择器分区{ 显示:无; 左:8px; 位置:绝对位置; 顶部:31px; 宽度:50%!重要; z指数:1; } .ui-datepicker-header.ui-widget-header{ 背景色:F6F6F6!重要; 边界:0!重要; 字体大小:粗体; 颜色:9c9c9c!重要; } .ui日期选择器th{ 背景色:F6F6F6!重要; 边界:0!重要; 字体大小:正常; } .低票面价值{ 颜色:326EA6; 空白:无换行; 字体大小:10px; } .lowTicketValue:激活{ 颜色:fff!重要; 空白:无换行; } .ui日期选择器.ui状态范围{ 背景:蓝色!重要; } .ui日期选择器日历。高亮显示{ 背景色:黄色!重要; } .ui状态范围{ 背景色:F47777C!重要; } .highTicketValue{ 颜色:F4777C!重要; } ui日期选择器分区tr td:n-child2n+1>span{ 颜色:F4777C!重要; } ui日期选择器分区tr td:n-child2n+1:active>span, ui日期选择器div tr td:n-child2n+1:hover>span{ 颜色:fff!imp 奥坦特; } .突出显示a{ 背景色:绿色!重要; 背景图像:无!重要; 颜色:白色!重要; 字体大小:粗体!重要; 字号:12号; } .ui红色{ 背景:红色; } .亮点{ 背景色:黄色!重要; } $function{ $'flexibledates'。日期选择器{ 更改月份:false, 月数:2, 日期格式:“D,D MM”, dayNamesMin:[“太阳”、“星期一”、“星期二”、“星期三”、“星期四”、“星期五”、“星期六”], 显示前:功能输入,安装{ 插入消息开始日期; }, beforeShowDay:functiondate{ var d=date.getTime; 如果$flexibledates.datepickergetDate&&$flightDeviation.datepickergetDate&&d<$flightDeviation.datepickergetDate.getTime&&d>$flexibledates.datepickergetDate.getTime{ 返回[true,‘ui状态突出显示’,]; }否则{ 返回[真,]; } }, onSelect:functionselectedDate{ var selectedDate=$flexibledates.datepickergetDate; 如果选择日期!=null{ $'FlightDeviation'。日期选择器'option','minDate',selectedDate.datepicker'refresh'; } } }; $'FlightDeviation'。日期选择器{ 更改月份:false, 月数:2, 日期格式:“D,D MM”, dayNamesMin:[“太阳”、“星期一”、“星期二”、“星期三”、“星期四”、“星期五”、“星期六”], 显示前:功能输入,安装{ $ui日期选择器分区td.off; $document.onMouseCenter,用户界面日期选择器分区td,函数E{ $this.parent.addClassfinalRow; $.finalRow.parents'.ui datepicker group last'.parent.find'.ui datepicker group first'.find'tr'.last.addClassfinalRowRangeOtherTable; $.finalRowRangeOtherTable.findtd:not.ui-datepicker-unselectable.addClasshighlight; $.finalRowRangeOtherTable.prevAll.findtd:not.ui-datepicker-unselectable.addClasshighlight; $.finalRow.prevAll.findtd:not.ui-datepicker-unselectable.addClasshighlight; $this.prevAlltd:not.ui-datepicker-unselectable.addClasshighlight; }; $document.onmouseleave,用户界面日期选择器分区td,函数E{ $this.parent.removeClassfinalRow; $ui datepicker div td.removeclassphighlight; $.finalRowRange.removeClassfinalRowRange.find'.highlight'.removeClasshighlight; $.finalRowRangeOtherTable.removeClassfinalRowRangeOtherTable.find'.highlight'.removeClasshighlight; }; insertMessageEndDate; }, beforeShowDay:functiondate{ var d=date.getTime; 如果$flexibledates.datepickergetDate&&d==$flexibledates.datepickergetDate.getTime{ 返回[true,‘ui红色’,]; } 如果$flexibledates.datepickergetDate&&$flightDeviation.datepickergetDate&&d<$flightDeviation.datepickergetDate.getTime&&d>$flexibledates.datepickergetDate.getTime{ 返回[true,‘ui状态突出显示’,]; }否则{ 返回[真,]; } }, onSelect:functionselectedDate{ $'flexibledates'.datepicker'option','maxDate',$this.datepicker'getDate';//重置最大日期 $ui日期选择器分区td.off; $document.onMouseCenter,用户界面日期选择器分区td,函数E{ $this.parent.addClassfinalRow; $.finalRow.parents'.ui datepicker group last'.parent.find'.ui datepicker group first'.find'tr'.last.addClassfinalRowRangeOtherTable; $.finalRowRangeOtherTable.findtd:not.ui-datepicker-unselectable.addClasshighlight; $.finalRowRangeOtherTable.prevAll.findtd:not.ui-datepicker-unselectable.addClasshighlight; $.finalRow.prevAll.findtd:not.ui-datepicker-unselectable.addClasshighlight; $this.prevAlltd:not.ui-datepicker-unselectable.addClasshighlight; }; $ui日期选择器div td.onmouseleave,函数{ $this.parent.removeClassfinalRow; $ui datepicker div td.removeclassphighlight; $.finalRowRange.removeClassfinalRowRange.find'.highlight'.removeClasshighlight; $.finalRowRangeOtherTable.removeClassfinalRowRangeOtherTable.find'.highlight'.removeClasshighlight; }; } }; 函数insertMessageStartDatemessage{ ClearTimeOutinerTMessageStartDate.timer; 如果$'ui-datepicker-div.ui datepicker calendar.ui state default'.是“:可见”{ $'.ui状态默认值',在+45555+之后; }否则 insertMessageStartDate.timer=SetTimeOutinerTMessageStartDate,10; } 函数insertMessageEndDatemessage{ ClearTimeOutinerTMessageEndDate.timer; //$flexibledates.datepickergetDate.css{背景色:f47777c!重要,颜色:fff!重要}; 如果$'ui-datepicker-div.ui datepicker calendar.ui state default'.是“:可见”{ $'.ui状态默认值',在+45555+之后; $ui日期选择器div tr td.clickfunction{ $this.preventil'.ui日期选择器不可选择'.css{ 颜色:红色, 边框:2件纯红 }; }; }否则 insertMessageEndDate.timer=SetTimeOutinerTMessageEndDate,10; } };
我需要在悬停的时候高亮显示。我也需要在悬停的时候高亮显示。