# awtk-widget-date-picker **Repository Path**: awtk/awtk-widget-date-picker ## Basic Information - **Project Name**: awtk-widget-date-picker - **Description**: date_picker 日期选择控件 - **Primary Language**: Unknown - **License**: LGPL-2.1 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-04-11 - **Last Updated**: 2022-05-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # awtk-widget-date-picker 日期选择控件。 > 默认界面比较朴素,请根据应用程序的风格,自己进行调整。 英文界面: ![](docs/images/ui.jpg) 中文界面: ![](docs/images/ui_zh.jpg) ## 准备 1. 获取 awtk 并编译 ``` git clone https://github.com/zlgopen/awtk.git cd awtk; scons; cd - ``` ## 运行 1. 生成示例代码的资源 ``` python scripts/update_res.py all ``` > 也可以使用 Designer 打开项目,之后点击 “打包” 按钮进行生成; > 如果资源发生修改,则需要重新生成资源。 如果 PIL 没有安装,执行上述脚本可能会出现如下错误: ```cmd Traceback (most recent call last): ... ModuleNotFoundError: No module named 'PIL' ``` 请用 pip 安装: ```cmd pip install Pillow ``` 2. 编译 * 编译PC版本 ``` scons ``` * 编译LINUX FB版本 ``` scons LINUX_FB=true ``` > 完整编译选项请参考[编译选项](https://github.com/zlgopen/awtk-widget-generator/blob/master/docs/build_options.md) 3. 运行 ``` ./bin/demo ``` ## 文档 ### 基本用法 date\_edit 需要两个特殊名称的子控件,它们的名称和功能如下: * date 用于显示和编辑日期,通常用 edit 控件,并指定 input type 为"date" * pick 用于点击后弹出日期选择控件。通常用 button 控件。点击 pick 按钮后,会打开名为"date_picker"的弹出窗口。 > 子控件的大小和风格可以自行设定,遵循命名规则即可。 示例: ```xml