{"id":20073329,"url":"https://github.com/1691665955/date_time_component_demo","last_synced_at":"2026-02-21T21:06:51.569Z","repository":{"id":152808990,"uuid":"277050803","full_name":"1691665955/date_time_component_demo","owner":"1691665955","description":"微信小程序自定义时间选择器（包含日期和时间）","archived":false,"fork":false,"pushed_at":"2021-12-27T08:21:49.000Z","size":11,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-15T07:27:17.344Z","etag":null,"topics":["date","datepicker","datepicker-component","picker"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1691665955.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-04T06:13:46.000Z","updated_at":"2023-08-07T01:33:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"20538c98-16a5-4609-9a14-dcc47f433d7c","html_url":"https://github.com/1691665955/date_time_component_demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/1691665955/date_time_component_demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1691665955%2Fdate_time_component_demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1691665955%2Fdate_time_component_demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1691665955%2Fdate_time_component_demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1691665955%2Fdate_time_component_demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1691665955","download_url":"https://codeload.github.com/1691665955/date_time_component_demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1691665955%2Fdate_time_component_demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29694197,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T18:18:25.093Z","status":"ssl_error","status_checked_at":"2026-02-21T18:18:22.435Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["date","datepicker","datepicker-component","picker"],"created_at":"2024-11-13T14:44:54.733Z","updated_at":"2026-02-21T21:06:51.552Z","avatar_url":"https://github.com/1691665955.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# date_time_component_demo\n微信小程序自定义时间选择器（包含日期和时间）\n\n在微信小程序的开发过程中，我们有时候会使用到日期时间的选择，但是目前微信小程序官方的picker中只有日期选择和时间选择，这两种mode是分开的，不能满足我们需要的条件，所以我花了一些时间来自定义了一个日期时间选择器。\n它实现了日期时间的选中，通过format来定义时间的格式，'YYYY-MM-DD hh:mm'代表选择器可选择年月日时分，'YYYY-MM-DD hh:mm:ss'则代表选择器可选择年月日时分秒；通过mode来区分传入的时间参数类型，'time'代表传入的时间参数为时间字符串类型（例如'2020-07-04 08:30:00'），'date'代表传入的时间参数为Date类型（例如 new Date('2020-07-04 08:30:00')）;text和placeholder则用来显示picker的显示值以及显示值为空的默认值；最后可通过style来设置选择器的显示样式。\n\n\n- 年月日时分选择器\n\n![](https://upload-images.jianshu.io/upload_images/23687863-5fb49a6fd0d14e2b.png)\n\n- 年月日时分秒选择器\n\n![](https://upload-images.jianshu.io/upload_images/23687863-8b0b7af00f11230a.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1691665955%2Fdate_time_component_demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1691665955%2Fdate_time_component_demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1691665955%2Fdate_time_component_demo/lists"}