diff --git a/README.md b/README.md index 81f3e3c2..815b705f 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ -# @react-native-oh-tpl/react-native-date-picker +# 迁移声明 -This project is based on [react-native-date-picker v5.0.4](https://github.com/henninghall/react-native-date-picker/releases/tag/v5.0.4) +- 本仓库已迁移至 GitCode:[OpenHarmony-SIG/rntpc_react-native-datepicker](https://gitcode.com/openharmony-sig/rntpc_react-native-datepicker)。 +- 包名已更改为 `@react-native-ohos/react-native-date-picker`,支持直接从 npm 下载。 +- 更多详情请查阅新仓库的 README 文件。 +- 本仓库旧版本的文档已归档:[链接](/doc/zh-cn.md) -## Documentation +# Migration Announcement -- [中文](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-date-picker.md) - -- [English](https://gitee.com/react-native-oh-library/usage-docs/blob/master/en/react-native-date-picker.md) - -## License - -This library is licensed under [The MIT License (MIT)](https://github.com/henninghall/react-native-date-picker/blob/master/LICENSE) \ No newline at end of file +- This repository has been migrated to GitCode:[OpenHarmony-SIG/rntpc_react-native-datepicker](https://gitcode.com/openharmony-sig/rntpc_react-native-datepicker) +- The package name has been changed to `@react-native-ohos/react-native-date-picker` and is now available for direct download from npm. +- For more details, please refer to the README in the new repository. +- Archived documentation for versions in this repository can be found here: [Link](/doc/en.md) diff --git a/doc/en.md b/doc/en.md new file mode 100644 index 00000000..232056e4 --- /dev/null +++ b/doc/en.md @@ -0,0 +1,255 @@ +> Template version: v0.2.2 + +

+

react-native-date-picker

+

+

+ + Supported platforms + + + License + +

+ +> [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-date-picker) + +## Installation and Usage + +Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/react-native-date-picker Releases](https://github.com/react-native-oh-library/react-native-date-picker/releases).For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package. + +Go to the project directory and execute the following instruction: + + + +#### **npm** + +```bash +npm install @react-native-oh-tpl/react-native-date-picker +``` + +#### **yarn** + +```bash +yarn add @react-native-oh-tpl/react-native-date-picker +``` + +The following code shows the basic use scenario of the repository: + +> [!WARNING] The name of the imported repository remains unchanged. + +```tsx +import React, { useState } from 'react' +import { Button, View } from 'react-native' +import DatePicker from 'react-native-date-picker' + +export default () => { + const [date, setDate] = useState(new Date()) + const [open, setOpen] = useState(false) + + return ( + +