mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-03 20:49:14 +08:00
Pass id prop to DatePicker input field (#8598)
This commit is contained in:
parent
b7901e541a
commit
cfdb1cab4b
@ -301,6 +301,7 @@ export default class RangePicker extends React.Component<any, RangePickerState>
|
|||||||
return (
|
return (
|
||||||
<span
|
<span
|
||||||
ref={this.savePicker}
|
ref={this.savePicker}
|
||||||
|
id={props.id}
|
||||||
className={classNames(props.className, props.pickerClass)}
|
className={classNames(props.className, props.pickerClass)}
|
||||||
style={{ ...style, ...pickerStyle }}
|
style={{ ...style, ...pickerStyle }}
|
||||||
tabIndex={props.disabled ? -1 : 0}
|
tabIndex={props.disabled ? -1 : 0}
|
||||||
|
@ -131,7 +131,7 @@ export default class WeekPicker extends React.Component<any, any> {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<span className={classNames(className, pickerClass)}>
|
<span className={classNames(className, pickerClass)} id={this.props.id}>
|
||||||
<RcDatePicker
|
<RcDatePicker
|
||||||
{...this.props}
|
{...this.props}
|
||||||
calendar={calendar}
|
calendar={calendar}
|
||||||
|
@ -162,6 +162,7 @@ export default function createPicker(TheCalendar: React.ComponentClass): any {
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<span
|
<span
|
||||||
|
id={props.id}
|
||||||
className={classNames(props.className, props.pickerClass)}
|
className={classNames(props.className, props.pickerClass)}
|
||||||
style={props.style}
|
style={props.style}
|
||||||
onFocus={props.onFocus}
|
onFocus={props.onFocus}
|
||||||
|
@ -3,6 +3,7 @@ import * as moment from 'moment';
|
|||||||
import { TimePickerProps } from '../time-picker';
|
import { TimePickerProps } from '../time-picker';
|
||||||
|
|
||||||
export interface PickerProps {
|
export interface PickerProps {
|
||||||
|
id?: number | string;
|
||||||
prefixCls?: string;
|
prefixCls?: string;
|
||||||
inputPrefixCls?: string;
|
inputPrefixCls?: string;
|
||||||
format?: string;
|
format?: string;
|
||||||
|
@ -1720,6 +1720,7 @@ exports[`renders ./components/form/demo/time-related-controls.md correctly 1`] =
|
|||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="ant-calendar-picker"
|
class="ant-calendar-picker"
|
||||||
|
id="date-picker"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<input
|
<input
|
||||||
@ -1758,6 +1759,7 @@ exports[`renders ./components/form/demo/time-related-controls.md correctly 1`] =
|
|||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="ant-calendar-picker"
|
class="ant-calendar-picker"
|
||||||
|
id="date-time-picker"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<input
|
<input
|
||||||
@ -1796,6 +1798,7 @@ exports[`renders ./components/form/demo/time-related-controls.md correctly 1`] =
|
|||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="ant-calendar-picker"
|
class="ant-calendar-picker"
|
||||||
|
id="month-picker"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<input
|
<input
|
||||||
@ -1834,6 +1837,7 @@ exports[`renders ./components/form/demo/time-related-controls.md correctly 1`] =
|
|||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="ant-calendar-picker"
|
class="ant-calendar-picker"
|
||||||
|
id="range-picker"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
@ -1888,6 +1892,7 @@ exports[`renders ./components/form/demo/time-related-controls.md correctly 1`] =
|
|||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="ant-calendar-picker"
|
class="ant-calendar-picker"
|
||||||
|
id="range-time-picker"
|
||||||
style="width:350px"
|
style="width:350px"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
>
|
>
|
||||||
|
Loading…
Reference in New Issue
Block a user