adjust time picker default width since font number to be laregr

This commit is contained in:
zombiej 2018-09-06 19:16:37 +08:00
parent b3ad34d08f
commit 0ea5d6af70
8 changed files with 219 additions and 210 deletions

View File

@ -346,6 +346,7 @@ exports[`renders ./components/date-picker/demo/disabled-date.md correctly 1`] =
<div>
<span
class="ant-calendar-picker"
style="width:195px"
>
<div>
<input
@ -490,6 +491,7 @@ exports[`renders ./components/date-picker/demo/extra-footer.md correctly 1`] = `
</span>
<span
class="ant-calendar-picker"
style="width:195px"
>
<div>
<input
@ -815,6 +817,7 @@ exports[`renders ./components/date-picker/demo/mode.md correctly 1`] = `
<div>
<span
class="ant-calendar-picker"
style="width:195px"
>
<div>
<input
@ -1204,6 +1207,7 @@ exports[`renders ./components/date-picker/demo/start-end.md correctly 1`] = `
<div>
<span
class="ant-calendar-picker"
style="width:195px"
>
<div>
<input
@ -1234,6 +1238,7 @@ exports[`renders ./components/date-picker/demo/start-end.md correctly 1`] = `
</span>
<span
class="ant-calendar-picker"
style="width:195px"
>
<div>
<input
@ -1269,6 +1274,7 @@ exports[`renders ./components/date-picker/demo/time.md correctly 1`] = `
<div>
<span
class="ant-calendar-picker"
style="width:195px"
>
<div>
<input

View File

@ -119,11 +119,13 @@ export default function createPicker(TheCalendar: React.ComponentClass): any {
let pickerProps: Object = {};
let calendarProps: any = {};
const pickerStyle: { width?: number } = {};
if (props.showTime) {
calendarProps = {
// fix https://github.com/ant-design/ant-design/issues/1902
onSelect: this.handleChange,
};
pickerStyle.width = 195;
} else {
pickerProps = {
onChange: this.handleChange,
@ -187,7 +189,7 @@ export default function createPicker(TheCalendar: React.ComponentClass): any {
<span
id={props.id}
className={classNames(props.className, props.pickerClass)}
style={props.style}
style={{ ...pickerStyle, ...props.style }}
onFocus={props.onFocus}
onBlur={props.onBlur}
onMouseEnter={props.onMouseEnter}

View File

@ -2171,6 +2171,7 @@ exports[`renders ./components/form/demo/time-related-controls.md correctly 1`] =
<span
class="ant-calendar-picker"
id="date-time-picker"
style="width:195px"
>
<div>
<input

View File

@ -123,7 +123,7 @@ exports[`Table.filter renders filter correctly 1`] = `
class="ant-table-tbody"
>
<tr
class="ant-table-row ant-table-row-level-0"
class="ant-table-row ant-table-row-level-0"
data-row-key="0"
>
<td
@ -137,7 +137,7 @@ exports[`Table.filter renders filter correctly 1`] = `
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
class="ant-table-row ant-table-row-level-0"
data-row-key="1"
>
<td
@ -151,7 +151,7 @@ exports[`Table.filter renders filter correctly 1`] = `
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
class="ant-table-row ant-table-row-level-0"
data-row-key="2"
>
<td
@ -165,7 +165,7 @@ exports[`Table.filter renders filter correctly 1`] = `
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
class="ant-table-row ant-table-row-level-0"
data-row-key="3"
>
<td

View File

@ -42,7 +42,7 @@ exports[`Table.pagination renders pagination correctly 1`] = `
class="ant-table-tbody"
>
<tr
class="ant-table-row ant-table-row-level-0"
class="ant-table-row ant-table-row-level-0"
data-row-key="0"
>
<td
@ -56,7 +56,7 @@ exports[`Table.pagination renders pagination correctly 1`] = `
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
class="ant-table-row ant-table-row-level-0"
data-row-key="1"
>
<td

View File

@ -71,7 +71,7 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
class="ant-table-tbody"
>
<tr
class="ant-table-row ant-table-row-level-0"
class="ant-table-row ant-table-row-level-0"
data-row-key="0"
>
<td
@ -106,7 +106,7 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
class="ant-table-row ant-table-row-level-0"
data-row-key="1"
>
<td
@ -141,7 +141,7 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
class="ant-table-row ant-table-row-level-0"
data-row-key="2"
>
<td
@ -176,7 +176,7 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
class="ant-table-row ant-table-row-level-0"
data-row-key="3"
>
<td
@ -265,7 +265,7 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
class="ant-table-tbody"
>
<tr
class="ant-table-row ant-table-row-level-0"
class="ant-table-row ant-table-row-level-0"
data-row-key="0"
>
<td
@ -291,7 +291,7 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
class="ant-table-row ant-table-row-level-0"
data-row-key="1"
>
<td
@ -317,7 +317,7 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
class="ant-table-row ant-table-row-level-0"
data-row-key="2"
>
<td
@ -343,7 +343,7 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
class="ant-table-row ant-table-row-level-0"
data-row-key="3"
>
<td

View File

@ -69,7 +69,7 @@ exports[`Table renders JSX correctly 1`] = `
class="ant-table-tbody"
>
<tr
class="ant-table-row ant-table-row-level-0"
class="ant-table-row ant-table-row-level-0"
data-row-key="1"
>
<td
@ -93,7 +93,7 @@ exports[`Table renders JSX correctly 1`] = `
</td>
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
class="ant-table-row ant-table-row-level-0"
data-row-key="2"
>
<td

File diff suppressed because it is too large Load Diff