{"name":"rc-picker","version":"4.7.2","keywords":["react","react-component","react-picker"],"license":"MIT","_id":"rc-picker@4.7.2","homepage":"https://react-component.github.io/picker","bugs":{"url":"http://github.com/react-component/picker/issues"},"dist":{"shasum":"cdca4b294a587dcb2dd1e43701505b426d4b16a6","tarball":"http://registry-npm.ywwl.com/rc-picker/download/rc-picker-4.7.2.tgz","fileCount":569,"integrity":"sha512-KShWVIdrncIKBZ1rm6E2s4Di9jlpcm38EYIZ472skXqKUz8YKlWQgewG5dT+HUjfon+tLs7dp5kmWUe0bW7Gqw==","signatures":[{"sig":"MEQCIESIfIX/BkQJMtsbNN6FgXHuM7kYHJ2Hd7OF99g4CDKMAiAK+Dc7A61dBQFJigYZZIJjZyb5k8yRfL+xFi3w2tNAAQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":904052,"size":133330,"noattachment":false,"key":"/rc-picker/-/rc-picker-4.7.2.tgz"},"main":"./lib/index","types":"./lib/index.d.ts","module":"./es/index","engines":{"node":">=8.x"},"gitHead":"e1d6848d58d6a9a2f6151c8493740fda787451aa","scripts":{"lint":"eslint src/ --ext .ts,.tsx,.jsx,.js,.md","test":"rc-test","build":"dumi build","start":"dumi dev","compile":"father build && lessc assets/index.less assets/index.css","prepare":"npx husky","coverage":"father test --coverage","gh-pages":"npm run build && father doc deploy","lint:tsc":"tsc -p tsconfig.json --noEmit","prettier":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","now-build":"npm run build","prepublishOnly":"npm run compile && np --yolo --no-publish"},"_npmUser":{"name":"afc163","email":"afc163@gmail.com"},"repository":{"url":"git+ssh://git@github.com/react-component/picker.git","type":"git"},"_npmVersion":"10.8.3","description":"React date & time picker","directories":{},"_nodeVersion":"22.8.0","dependencies":{"rc-util":"^5.43.0","classnames":"^2.2.1","rc-overflow":"^1.3.2","@babel/runtime":"^7.24.7","rc-resize-observer":"^1.4.0","@rc-component/trigger":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"np":"^10.0.2","dumi":"^2.1.15","glob":"^10.4.1","less":"^4.2.0","dayjs":"1.x","husky":"^9.0.11","luxon":"3.x","react":"^18.2.0","eslint":"^8.56.0","father":"^4.0.0","moment":"^2.24.0","rc-test":"^7.0.9","date-fns":"2.x","mockdate":"^3.0.2","prettier":"^3.1.0","coveralls":"^3.0.6","cross-env":"^7.0.2","react-dom":"^18.2.0","typescript":"^5.3.0","@types/jest":"^29.4.0","lint-staged":"^15.2.7","@types/luxon":"^3.2.0","@types/react":"^18.0.28","moment-timezone":"^0.5.45","@types/react-dom":"^18.0.8","@types/classnames":"^2.2.9","eslint-plugin-jest":"^28.8.1","eslint-plugin-unicorn":"^55.0.0","@testing-library/react":"^16.0.0","eslint-plugin-react-hooks":"^4.6.0","@rc-component/father-plugin":"^1.0.0","eslint-plugin-eslint-comments":"^3.2.0"},"peerDependencies":{"dayjs":">= 1.x","luxon":">= 3.x","react":">=16.9.0","moment":">= 2.x","date-fns":">= 2.x","react-dom":">=16.9.0"},"peerDependenciesMeta":{"dayjs":{"optional":true},"luxon":{"optional":true},"moment":{"optional":true},"date-fns":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/rc-picker_4.7.2_1730951022789_0.571289755204569","host":"s3://npm-registry-packages"},"readme":"# rc-picker\n\n[![NPM version][npm-image]][npm-url] [![build status][github-actions-image]][github-actions-url] [![Codecov][codecov-image]][codecov-url] [![npm download][download-image]][download-url] [![bundle size][bundlephobia-image]][bundlephobia-url]\n\n[npm-image]: http://img.shields.io/npm/v/rc-picker.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/rc-picker\n[github-actions-image]: https://github.com/react-component/picker/workflows/CI/badge.svg\n[github-actions-url]: https://github.com/react-component/picker/actions\n[codecov-image]: https://img.shields.io/codecov/c/github/react-component/picker/master.svg?style=flat-square\n[codecov-url]: https://codecov.io/gh/react-component/picker/branch/master\n[david-url]: https://david-dm.org/react-component/picker\n[david-image]: https://david-dm.org/react-component/picker/status.svg?style=flat-square\n[david-dev-url]: https://david-dm.org/react-component/picker?type=dev\n[david-dev-image]: https://david-dm.org/react-component/picker/dev-status.svg?style=flat-square\n[download-image]: https://img.shields.io/npm/dm/rc-picker.svg?style=flat-square\n[download-url]: https://npmjs.org/package/rc-picker\n[bundlephobia-url]: https://bundlephobia.com/result?p=rc-picker\n[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-picker\n\n## Live Demo\n\nhttps://react-component.github.io/picker/\n\n## Install\n\n[![rc-picker](https://nodei.co/npm/rc-picker.png)](https://npmjs.org/package/rc-picker)\n\n## Usage\n\n```js\nimport Picker from 'rc-picker';\nimport 'rc-picker/assets/index.css';\nimport { render } from 'react-dom';\n\nrender(<Picker />, mountNode);\n```\n\n## API\n\n### Picker\n\n| Property | Type | Default | Description |\n| --- | --- | --- | --- |\n| prefixCls | String | rc-picker | prefixCls of this component |\n| className | String | '' | additional css class of root dom node |\n| style | React.CSSProperties |  | additional style of root dom node |\n| dropdownClassName | String | '' | additional className applied to dropdown |\n| popupAlign | Object:alignConfig of [dom-align](https://github.com/yiminghe/dom-align) |  | value will be merged into placement's popupAlign config |\n| popupStyle | React.CSSProperties |  | customize popup style |\n| transitionName | String | '' | css class for animation |\n| locale | Object | import from 'rc-picker/lib/locale/en_US' | rc-picker locale |\n| inputReadOnly | boolean | false | set input to read only |\n| allowClear | boolean \\| { clearIcon?: ReactNode } | false | whether show clear button or customize clear button |\n| autoFocus | boolean | false | whether auto focus |\n| showTime | boolean \\| Object | [showTime options](#showTime-options) | to provide an additional time selection |\n| picker | time \\| date \\| week \\| month \\| year |  | control which kind of panel should be shown |\n| format | String \\| String[] | depends on whether you set timePicker and your locale | use to format/parse date(without time) value to/from input. When an array is provided, all values are used for parsing and first value for display |\n| use12Hours | boolean | false | 12 hours display mode |\n| value | moment |  | current value like input's value |\n| defaultValue | moment |  | defaultValue like input's defaultValue |\n| open | boolean | false | current open state of picker. controlled prop |\n| suffixIcon | ReactNode |  | The custom suffix icon |\n| prevIcon | ReactNode |  | The custom prev icon |\n| nextIcon | ReactNode |  | The custom next icon |\n| superPrevIcon | ReactNode |  | The custom super prev icon |\n| superNextIcon | ReactNode |  | The custom super next icon |\n| disabled | boolean | false | whether the picker is disabled |\n| placeholder | String |  | picker input's placeholder |\n| getPopupContainer | function(trigger) |  | to set the container of the floating layer, while the default is to create a div element in body |\n| onChange | Function(date: moment, dateString: string) |  | a callback function, can be executed when the selected time is changing |\n| onOpenChange | Function(open:boolean) |  | called when open/close picker |\n| onFocus | (event:React.FocusEvent\\<HTMLInputElement>) => void |  | called like input's on focus |\n| onBlur | (event:React.FocusEvent\\<HTMLInputElement>) => void |  | called like input's on blur |\n| onKeyDown | (event:React.KeyboardEvent\\<HTMLInputElement>, preventDefault: () => void) => void |  | input on keydown event |\n| direction | String: ltr or rtl |  | Layout direction of picker component, it supports RTL direction too. |\n\n### PickerPanel\n\n| Property | Type | Default | Description |\n| --- | --- | --- | --- |\n| prefixCls | String | rc-picker | prefixCls of this component |\n| className | String | '' | additional css class of root dom |\n| style | React.CSSProperties |  | additional style of root dom node |\n| locale | Object | import from 'rc-picker/lib/locale/en_US' | rc-picker locale |\n| value | moment |  | current value like input's value |\n| defaultValue | moment |  | defaultValue like input's defaultValue |\n| defaultPickerValue | moment |  | Set default display picker view date |\n| mode | time \\| datetime \\| date \\| week \\| month \\| year \\| decade |  | control which kind of panel |\n| picker | time \\| date \\| week \\| month \\| year |  | control which kind of panel |\n| tabIndex | Number | 0 | view [tabIndex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) |\n| showTime | boolean \\| Object | [showTime options](#showTime-options) | to provide an additional time selection |\n| showToday | boolean | false | whether to show today button |\n| disabledDate | Function(date:moment) => boolean |  | whether to disable select of current date |\n| dateRender | Function(currentDate:moment, today:moment) => React.Node |  | custom rendering function for date cells |\n| monthCellRender | Function(currentDate:moment, locale:Locale) => React.Node |  | Custom month cell render method |\n| renderExtraFooter | (mode) => React.Node |  | extra footer |\n| onSelect | Function(date: moment) |  | a callback function, can be executed when the selected time |\n| onPanelChange | Function(value: moment, mode) |  | callback when picker panel mode is changed |\n| onMouseDown | (event:React.MouseEvent\\<HTMLInputElement>) => void |  | callback when executed onMouseDown event |\n| direction | String: ltr or rtl |  | Layout direction of picker component, it supports RTL direction too. |\n\n### RangePicker\n\n| Property | Type | Default | Description |\n| --- | --- | --- | --- |\n| prefixCls | String | rc-picker | prefixCls of this component |\n| className | String | '' | additional css class of root dom |\n| style | React.CSSProperties |  | additional style of root dom node |\n| locale | Object | import from 'rc-picker/lib/locale/en_US' | rc-picker locale |\n| value | moment |  | current value like input's value |\n| defaultValue | moment |  | defaultValue like input's defaultValue |\n| defaultPickerValue | moment |  | Set default display picker view date |\n| separator | String | '~' | set separator between inputs |\n| picker | time \\| date \\| week \\| month \\| year |  | control which kind of panel |\n| placeholder | [String, String] |  | placeholder of date input |\n| showTime | boolean \\| Object | [showTime options](#showTime-options) | to provide an additional time selection |\n| showTime.defaultValue | [moment, moment] |  | to set default time of selected date |\n| use12Hours | boolean | false | 12 hours display mode |\n| disabledTime | Function(date: moment, type:'start'\\|'end'):Object |  |  | to specify the time that cannot be selected |\n| ranges | { String \\| [range: string]: moment[] } \\| { [range: string]: () => moment[] } |  | preseted ranges for quick selection |\n| format | String \\| String[] | depends on whether you set timePicker and your locale | use to format/parse date(without time) value to/from input. When an array is provided, all values are used for parsing and first value for display |\n| allowEmpty | [boolean, boolean] |  | allow range picker clearing text |\n| selectable | [boolean, boolean] |  | whether to selected picker |\n| disabled | boolean | false | whether the range picker is disabled |\n| onChange | Function(value:[moment], formatString: [string, string]) |  | a callback function, can be executed when the selected time is changing |\n| onCalendarChange | Function(value:[moment], formatString: [string, string], info: { range:'start'\\|'end' }) |  | a callback function, can be executed when the start time or the end time of the range is changing |\n| direction | String: ltr or rtl |  | Layout direction of picker component, it supports RTL direction too. |\n| order | boolean | true | (TimeRangePicker only) `false` to disable auto order |\n\n### showTime-options\n\n| Property            | Type    | Default | Description                        |\n| ------------------- | ------- | ------- | ---------------------------------- |\n| format              | String  |         | moment format                      |\n| showHour            | boolean | true    | whether show hour                  |\n| showMinute          | boolean | true    | whether show minute                |\n| showSecond          | boolean | true    | whether show second                |\n| use12Hours          | boolean | false   | 12 hours display mode              |\n| hourStep            | Number  | 1       | interval between hours in picker   |\n| minuteStep          | Number  | 1       | interval between minutes in picker |\n| secondStep          | Number  | 1       | interval between seconds in picker |\n| hideDisabledOptions | boolean | false   | whether hide disabled options      |\n| defaultValue        | moment  | null    | default initial value              |\n\n## Development\n\n```\nnpm install\nnpm start\n```\n\n## License\n\nrc-picker is released under the MIT license.\n","publish_time":1730951022967,"maintainers":[{"name":"afc163","email":"afc163@gmail.com"},{"name":"zombiej","email":"smith3816@gmail.com"},{"name":"07akioni","email":"07akioni2@gmail.com"},{"name":"lixuan","email":"kermitlx@outlook.com"},{"name":"xrkffgg","email":"xrkffgg@hotmail.com"},{"name":"madccc","email":"1075746765@qq.com"}],"_cnpm_publish_time":1730951022967,"dist-tags":{"latest":"4.11.3"}}