mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
support name prop (#15029)
This commit is contained in:
parent
94814d955f
commit
fb6a493f11
@ -17,6 +17,11 @@ describe('DatePicker', () => {
|
||||
MockDate.reset();
|
||||
});
|
||||
|
||||
it('support name prop', () => {
|
||||
const wrapper = mount(<DatePicker name="bamboo" />);
|
||||
expect(wrapper.find('input').props().name).toBe('bamboo');
|
||||
});
|
||||
|
||||
it('prop locale should works', () => {
|
||||
const locale = {
|
||||
lang: {
|
||||
|
@ -230,6 +230,7 @@ export default function createPicker(TheCalendar: React.ComponentClass): any {
|
||||
placeholder={placeholder}
|
||||
className={props.pickerInputClass}
|
||||
tabIndex={props.tabIndex}
|
||||
name={props.name}
|
||||
{...dataOrAriaProps}
|
||||
/>
|
||||
{clearIcon}
|
||||
|
@ -4,6 +4,7 @@ import { TimePickerProps } from '../time-picker';
|
||||
|
||||
export interface PickerProps {
|
||||
id?: number | string;
|
||||
name?: string;
|
||||
prefixCls?: string;
|
||||
inputPrefixCls?: string;
|
||||
format?: string | string[];
|
||||
|
Loading…
Reference in New Issue
Block a user