{"_id":"23mofang-react-native-datepicker","_rev":"2-b741cd3f6304dec8f0c45fec0b1c0329","name":"23mofang-react-native-datepicker","description":"react native datePicker component for both Android and IOS, useing DatePikcerAndroid, TimePickerAndroid and DatePickerIOS","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"23mofang-react-native-datepicker","version":"1.0.0","description":"react native datePicker component for both Android and IOS, useing DatePikcerAndroid, TimePickerAndroid and DatePickerIOS","main":"index.js","scripts":{"start":"node node_modules/react-native/local-cli/cli.js start","mocha":"./node_modules/mocha/bin/_mocha ./test/*.test.js --watch","test":"node ./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha ./test/*.test.js","coverage":"cat ./coverage/lcov.info | coveralls","changelog":"conventional-changelog -p angular -i CHANGELOG.md -s","lint":"eslint ."},"repository":{"type":"git","url":"git+https://github.com/xgfe/react-native-datepicker.git"},"keywords":["react-native","DatePicker"],"author":{"name":"23mofang"},"license":"MIT","bugs":{"url":"https://github.com/xgfe/react-native-datepicker/issues"},"homepage":"https://github.com/xgfe/react-native-datepicker#readme","dependencies":{"moment":"2.x.x"},"devDependencies":{"babel-core":"^6.5.2","babel-eslint":"^7.2.3","babel-preset-react-native":"^1.8.0","chai":"^3.5.0","coveralls":"^2.11.9","cz-conventional-changelog":"^1.1.6","enzyme":"^2.4.0","eslint":"^3.19.0","eslint-plugin-react":"^7.0.1","istanbul":"^1.0.0-alpha.2","jsdom":"^9.4.1","mocha":"^2.5.2","pre-commit":"^1.1.3","prop-types":"^15.5.10","react":"~15.4.0","react-addons-test-utils":"~15.4.0","react-dom":"~15.4.0","react-native":"~0.39.0","react-native-mock":"^0.2.8","sinon":"^1.17.4"},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"pre-commit":["lint"],"directories":{"test":"test"},"gitHead":"c8c3c4e2fe54b63e80ddcf0c0913650b2686464b","_id":"23mofang-react-native-datepicker@1.0.0","_shasum":"660551ba8023a86e0065c2b716da82cb914782c5","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.2","_npmUser":{"name":"23mf","email":"1008@23mofang.com"},"dist":{"shasum":"660551ba8023a86e0065c2b716da82cb914782c5","tarball":"https://registry.npmjs.org/23mofang-react-native-datepicker/-/23mofang-react-native-datepicker-1.0.0.tgz","integrity":"sha512-RqOKIfN6Fg2bkExAeYOBJz/HyGekPl61mVgnl4xztumdHViYXR0wuZvC2tQ5Yb/Z2KEmZVq49gyV5cEA5jA5Lg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9B76O8SD8T09RQnoE5ASyAb4bSb/eydxtXvlzZ8FmhgIgSqK8i0PL/kbO0aBUzqXMtKHsPQgrwzvjkkCI3rNVFJ0="}]},"maintainers":[{"name":"23mf","email":"1008@23mofang.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/23mofang-react-native-datepicker-1.0.0.tgz_1504582111394_0.11318365717306733"}}},"readme":"# 修改源码 \n添加defaultDate\n\n# react-native-datepicker [![Build Status](https://travis-ci.org/xgfe/react-native-datepicker.svg?branch=master)](https://travis-ci.org/xgfe/react-native-datepicker) [![Coverage Status](https://coveralls.io/repos/github/xgfe/react-native-datepicker/badge.svg?branch=master)](https://coveralls.io/github/xgfe/react-native-datepicker?branch=master) [![Monthly download](https://img.shields.io/npm/dm/react-native-datepicker.svg)](https://img.shields.io/npm/dm/react-native-datepicker.svg) [![Total downloads](https://img.shields.io/npm/dt/react-native-datepicker.svg)](https://img.shields.io/npm/dt/react-native-datepicker.svg)\nreact native datePicker component for both Android and IOS, using DatePickerAndroid, TimePickerAndroid and DatePickerIOS\n\n\n## Install\n\n```bash\nnpm install react-native-datepicker --save\n```\n\nOr using [react-native-ui-xg](https://github.com/xgfe/react-native-ui-xg), our react-naitve ui kit.\n\n```bash\nnpm install react-native-ui-xg --save\n```\n\n## Example\nCheck [index.android.js](https://github.com/xgfe/react-native-datepicker/blob/master/index.android.js) in the Example.\n\n![android](http://xgfe.github.io/react-native-datepicker/img/react-native-datepicker-android.gif)\n![ios](http://xgfe.github.io/react-native-datepicker/img/react-native-datepicker-ios.gif)\n\n## Usage\n\n```javascript\n\nimport React, { Component } from 'react'\nimport DatePicker from 'react-native-datepicker'\n\nexport default class MyDatePicker extends Component {\n  constructor(props){\n    super(props)\n    this.state = {date:\"2016-05-15\"}\n  }\n\n  render(){\n    return (\n      <DatePicker\n        style={{width: 200}}\n        date={this.state.date}\n        mode=\"date\"\n        placeholder=\"select date\"\n        format=\"YYYY-MM-DD\"\n        minDate=\"2016-05-01\"\n        maxDate=\"2016-06-01\"\n        confirmBtnText=\"Confirm\"\n        cancelBtnText=\"Cancel\"\n        customStyles={{\n          dateIcon: {\n            position: 'absolute',\n            left: 0,\n            top: 4,\n            marginLeft: 0\n          },\n          dateInput: {\n            marginLeft: 36\n          }\n          // ... You can check the source to find the other keys.\n        }}\n        onDateChange={(date) => {this.setState({date: date})}}\n      />\n    )\n  }\n}\n```\n\nYou can check [index.js](https://github.com/xgfe/react-native-datepicker/blob/master/index.android.js) in the Example for detail.\n\n## Properties\n\n| Prop  | Default  | Type | Description |\n| :------------ |:---------------:| :---------------:| :-----|\n| style | - | `object` | Specify the style of the DatePicker, eg. width, height...  |\n| date | - | <code>string &#124; date</code> | Specify the display date of DatePicker. `string` type value must match the specified format |\n| mode | 'date' | `enum` | The `enum` of `date`, `datetime` and `time` |\n| androidMode | 'default' | `enum` | The `enum` of `default`, `calendar` and `spinner` (only Android) |\n| format | 'YYYY-MM-DD' | `string` | Specify the display format of the date, which using [moment.js](http://momentjs.com/). The default value change according to the mode. |\n| confirmBtnText | '确定' | `string` | Specify the text of confirm btn in ios. |\n| cancelBtnText | '取消' | `string` | Specify the text of cancel btn in ios. |\n| iconSource | - | <code>{uri: string} &#124; number</code> | Specify the icon. Same as the `source` of Image, always using `require()` |\n| minDate | - | <code>string &#124; date</code> | Restricts the range of possible date values. |\n| maxDate | - | <code>string &#124; date</code> | Restricts the range of possible date values. |\n| duration | 300 | `number` | Specify the animation duration of datepicker.|\n| customStyles | - | `number` | The hook of customize datepicker style, same as the native style. `dateTouchBody`, `dateInput`...|\n| showIcon | true | `boolean` | Controller whether or not show the icon |\n| hideText | false | `boolean` | Controller whether or not show the `dateText` |\n| iconComponent | - | `element` | Set the custom icon |\n| disabled | false | `boolean` | Controller whether or not disable the picker |\n| is24Hour | - | `boolean` | Set the TimePicker is24Hour flag. The default value depend on `format`. Only work in Android |\n| placeholder | '' | `string` | The placeholder show when this.props.date is falsy |\n| onDateChange | - | `function` | This is called when the user confirm the picked date or time in the UI. The first and only argument is a date or time string representing the new date and time formatted by [moment.js](http://momentjs.com/) with the given format property. |\n| onOpenModal | - | `function` | This is called when the DatePicker Modal open. |\n| onCloseModal | - | `function` | This is called when the DatePicker Modal close |\n| onPressMask | - | `function` | This is called when clicking the ios modal mask |\n| modalOnResponderTerminationRequest | - | `function` | Set the callback for React Native's [Gesture Responder System](https://facebook.github.io/react-native/docs/gesture-responder-system.html#responder-lifecycle)'s call to `onResponderTerminationRequest`. By default this will reject a termination request, but can be overidden in case the View under the Modal is implementing custom gesture responders, and you wish for those to be overidden in certain cases.  |\n| TouchableComponent | `TouchableHighlight` | `Component` | Replace the `TouchableHighlight` with a custom `Component`. For example : `TouchableOpacity` |\n| defaultDate | - | `string` | 点击日历选择器后，默认弹出的时间|\n\n### Property `customStyles` available keys\n\n* appearance: `dateInput`, `disabled`, `dateTouchBody`, `dateIcon`, `placeholderText`, `dateText`\n* ios select panel: `datePickerCon`, `datePicker`, `btnConfirm`, `btnTextConfirm`, `btnCancel`, `btnTextCancel`\n\n\n## Instance Methods\n\n| Method  | Params  | Description |\n| :------------ |:---------------:| :---------------:|\n| onPressDate | - | Manually open the date picker panel |\n| onPressCancel | - | Manually close the date picker panel like, similarly pressing cancel btn |\n","maintainers":[{"name":"23mf","email":"1008@23mofang.com"}],"time":{"modified":"2022-06-12T14:06:41.699Z","created":"2017-09-05T03:28:31.547Z","1.0.0":"2017-09-05T03:28:31.547Z"},"homepage":"https://github.com/xgfe/react-native-datepicker#readme","keywords":["react-native","DatePicker"],"repository":{"type":"git","url":"git+https://github.com/xgfe/react-native-datepicker.git"},"author":{"name":"23mofang"},"bugs":{"url":"https://github.com/xgfe/react-native-datepicker/issues"},"license":"MIT","readmeFilename":"README.md"}