Commit f8bba1ac990e01c37a94aa1c63f934b9e705b3dd
1 parent
09ba5efa
fixed DatePicker style in range type
Showing
3 changed files
with
18 additions
and
7 deletions
Show diff stats
examples/routers/date.vue
... | ... | @@ -248,14 +248,16 @@ |
248 | 248 | <!--</script>--> |
249 | 249 | |
250 | 250 | <template> |
251 | - <Row> | |
252 | - <Col span="12"> | |
251 | + <div style="width: 500px;margin: 100px;"> | |
252 | + <Row> | |
253 | + <Col span="12"> | |
253 | 254 | <DatePicker type="date" show-week-numbers placeholder="Select date" style="width: 200px"></DatePicker> |
254 | - </Col> | |
255 | - <Col span="12"> | |
255 | + </Col> | |
256 | + <Col span="12"> | |
256 | 257 | <DatePicker type="daterange" show-week-numbers placement="bottom-end" placeholder="Select date" style="width: 200px"></DatePicker> |
257 | - </Col> | |
258 | - </Row> | |
258 | + </Col> | |
259 | + </Row> | |
260 | + </div> | |
259 | 261 | </template> |
260 | 262 | <script> |
261 | 263 | export default { | ... | ... |
src/components/date-picker/panel/Date/date-range.vue
... | ... | @@ -165,7 +165,8 @@ |
165 | 165 | `${prefixCls}-body-wrapper`, |
166 | 166 | `${datePrefixCls}-with-range`, |
167 | 167 | { |
168 | - [`${prefixCls}-with-sidebar`]: this.shortcuts.length | |
168 | + [`${prefixCls}-with-sidebar`]: this.shortcuts.length, | |
169 | + [`${datePrefixCls}-with-week-numbers`]: this.showWeekNumbers | |
169 | 170 | } |
170 | 171 | ]; |
171 | 172 | }, | ... | ... |
src/styles/components/date-picker.less
... | ... | @@ -203,6 +203,14 @@ |
203 | 203 | |
204 | 204 | } |
205 | 205 | |
206 | + &-with-week-numbers{ | |
207 | + .@{picker-prefix-cls}-panel{ | |
208 | + &-body{ | |
209 | + min-width: (@date-picker-cells-width-with-weeknumbers + 20) * 2; | |
210 | + } | |
211 | + } | |
212 | + } | |
213 | + | |
206 | 214 | &-transfer{ |
207 | 215 | z-index: @zindex-transfer; |
208 | 216 | max-height: none; | ... | ... |