jqxdatetimepicker - 样式当前日期(如果由用户选择)
jqxdatetimepicker - styling present date (if selected by user)
我在摸不着头脑的时候真的需要你的帮助。在我的一生中,我似乎无法设置当前日期的样式(如果 select 由用户在 jqxdatetimepicker 中编辑和选择)。
我的 objective 是这样的:当用户首次打开日期时间选择器时,不要 select 和设置当前日期的样式。相反,让用户选择select一个日期。
问题是当用户将鼠标悬停在当前日期 select 上时,它既没有阴影也没有样式来表明它已经 selected。
这是所需结果的图片:
这里是有问题的 fiddle 的示例:http://jsfiddle.net/y5sobb29/
这里是有问题的css:
.jqx-calendar-cell-today {
background-color: transparent;
border: none;
pointer-events: none;
cursor: default;
}
我相信您正在寻找这个:
.jqx-calendar-cell-today {
background-color: transparent;
border-color: transparent;
}
.jqx-calendar-cell-today:hover {
border-color: #999;
background-color: #e8e8e8;
}
已更新 fiddle。
注意:如果你想让它"remember"被按下,你应该使用:
.jqx-calendar-cell-today:not(.jqx-fill-state-pressed) {
background-color: transparent;
border-color: transparent;
}
.jqx-calendar-cell-today:not(.jqx-fill-state-pressed):hover {
border-color: #999;
background-color: #e8e8e8;
}
经过一番挖掘,想知道答案的人:
插入以下 jQuery 标记:
$("#jqxDateTimeInput").jqxDateTimeInput({
width: '250px',
height: '25px',
allowNullDate: true,
value: null
});
$('#jqxDateTimeInput').on('open', function (event) {
if($("#jqxDateTimeInput").jqxDateTimeInput('value')===null) {
$('.jqx-calendar .jqx-fill-state-pressed').removeClass('jqx-fill-state-pressed');
}
});
然后使用以下 CSS 属性:
.jqx-calendar-cell-today:not(.jqx-fill-state-hover):not(.jqx-fill-state-pressed) {
background-color: transparent;
border: none;
/* pointer-events: none;
cursor: default; */
}
可以在以下位置找到此示例的 jsFiddle:http://jsfiddle.net/Dimitar_jQWidgets/b70bmrf8/6/
我在摸不着头脑的时候真的需要你的帮助。在我的一生中,我似乎无法设置当前日期的样式(如果 select 由用户在 jqxdatetimepicker 中编辑和选择)。
我的 objective 是这样的:当用户首次打开日期时间选择器时,不要 select 和设置当前日期的样式。相反,让用户选择select一个日期。
问题是当用户将鼠标悬停在当前日期 select 上时,它既没有阴影也没有样式来表明它已经 selected。
这是所需结果的图片:
这里是有问题的 fiddle 的示例:http://jsfiddle.net/y5sobb29/
这里是有问题的css:
.jqx-calendar-cell-today {
background-color: transparent;
border: none;
pointer-events: none;
cursor: default;
}
我相信您正在寻找这个:
.jqx-calendar-cell-today {
background-color: transparent;
border-color: transparent;
}
.jqx-calendar-cell-today:hover {
border-color: #999;
background-color: #e8e8e8;
}
已更新 fiddle。
注意:如果你想让它"remember"被按下,你应该使用:
.jqx-calendar-cell-today:not(.jqx-fill-state-pressed) {
background-color: transparent;
border-color: transparent;
}
.jqx-calendar-cell-today:not(.jqx-fill-state-pressed):hover {
border-color: #999;
background-color: #e8e8e8;
}
经过一番挖掘,想知道答案的人:
插入以下 jQuery 标记:
$("#jqxDateTimeInput").jqxDateTimeInput({
width: '250px',
height: '25px',
allowNullDate: true,
value: null
});
$('#jqxDateTimeInput').on('open', function (event) {
if($("#jqxDateTimeInput").jqxDateTimeInput('value')===null) {
$('.jqx-calendar .jqx-fill-state-pressed').removeClass('jqx-fill-state-pressed');
}
});
然后使用以下 CSS 属性:
.jqx-calendar-cell-today:not(.jqx-fill-state-hover):not(.jqx-fill-state-pressed) {
background-color: transparent;
border: none;
/* pointer-events: none;
cursor: default; */
}
可以在以下位置找到此示例的 jsFiddle:http://jsfiddle.net/Dimitar_jQWidgets/b70bmrf8/6/