Browse Source

Revert "Pass id prop to DatePicker input field (#8598)"

This reverts commit 38bf0be4ab.
pull/9106/head
Wei Zhu 7 years ago
parent
commit
4332613633
  1. 1
      components/date-picker/RangePicker.tsx
  2. 2
      components/date-picker/WeekPicker.tsx
  3. 1
      components/date-picker/createPicker.tsx
  4. 1
      components/date-picker/interface.tsx
  5. 5
      components/form/__tests__/__snapshots__/demo.test.js.snap

1
components/date-picker/RangePicker.tsx

@ -301,7 +301,6 @@ export default class RangePicker extends React.Component<any, RangePickerState>
return (
<span
ref={this.savePicker}
id={props.id}
className={classNames(props.className, props.pickerClass)}
style={{ ...style, ...pickerStyle }}
tabIndex={props.disabled ? -1 : 0}

2
components/date-picker/WeekPicker.tsx

@ -131,7 +131,7 @@ export default class WeekPicker extends React.Component<any, any> {
);
};
return (
<span className={classNames(className, pickerClass)} id={this.props.id}>
<span className={classNames(className, pickerClass)}>
<RcDatePicker
{...this.props}
calendar={calendar}

1
components/date-picker/createPicker.tsx

@ -162,7 +162,6 @@ export default function createPicker(TheCalendar: React.ComponentClass): any {
}
return (
<span
id={props.id}
className={classNames(props.className, props.pickerClass)}
style={props.style}
onFocus={props.onFocus}

1
components/date-picker/interface.tsx

@ -3,7 +3,6 @@ import * as moment from 'moment';
import { TimePickerProps } from '../time-picker';
export interface PickerProps {
id?: number | string;
prefixCls?: string;
inputPrefixCls?: string;
format?: string;

5
components/form/__tests__/__snapshots__/demo.test.js.snap

@ -1720,7 +1720,6 @@ exports[`renders ./components/form/demo/time-related-controls.md correctly 1`] =
>
<span
class="ant-calendar-picker"
id="date-picker"
>
<div>
<input
@ -1759,7 +1758,6 @@ exports[`renders ./components/form/demo/time-related-controls.md correctly 1`] =
>
<span
class="ant-calendar-picker"
id="date-time-picker"
>
<div>
<input
@ -1798,7 +1796,6 @@ exports[`renders ./components/form/demo/time-related-controls.md correctly 1`] =
>
<span
class="ant-calendar-picker"
id="month-picker"
>
<div>
<input
@ -1837,7 +1834,6 @@ exports[`renders ./components/form/demo/time-related-controls.md correctly 1`] =
>
<span
class="ant-calendar-picker"
id="range-picker"
tabindex="0"
>
<span
@ -1892,7 +1888,6 @@ exports[`renders ./components/form/demo/time-related-controls.md correctly 1`] =
>
<span
class="ant-calendar-picker"
id="range-time-picker"
style="width:350px"
tabindex="0"
>

Loading…
Cancel
Save