样式定义位于
odoo12 / addons / web / static / src / scss / datepicker.scss
更改此处会对全局的时间字段显示造成影响,也可在需要修改的模块自定义样式.
以下是原生代码片段
.o_datepicker {
position: relative;
.o_datepicker_input {
width: 100%;
cursor: pointer;
}
.o_datepicker_button {
@include o-position-absolute(2px, 4px);
pointer-events: none; // let click events go through the underlying input
&:after {
@include o-caret-down;
}
}
.o_datepicker_warning {
top: 0;
right: 20px;
}
}
dt_format = '%Y-%m-%d %H:%M:%S.%f'
# 2019-12-6 15:29:03 这个格式的时间可将 .o_datepicker_input->width 设置为210px