{"id":13535926,"url":"https://github.com/dai-siki/vue-datepicker-simple","last_synced_at":"2025-04-02T02:31:40.486Z","repository":{"id":65378522,"uuid":"70860401","full_name":"dai-siki/vue-datepicker-simple","owner":"dai-siki","description":"A datepicker component for vue. （适用中国用户的vue日期选择组件）","archived":false,"fork":false,"pushed_at":"2019-04-28T03:15:36.000Z","size":472,"stargazers_count":57,"open_issues_count":8,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-17T13:41:32.168Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dai-siki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-14T00:51:24.000Z","updated_at":"2024-09-16T09:22:46.000Z","dependencies_parsed_at":"2023-01-20T09:48:26.101Z","dependency_job_id":null,"html_url":"https://github.com/dai-siki/vue-datepicker-simple","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dai-siki%2Fvue-datepicker-simple","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dai-siki%2Fvue-datepicker-simple/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dai-siki%2Fvue-datepicker-simple/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dai-siki%2Fvue-datepicker-simple/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dai-siki","download_url":"https://codeload.github.com/dai-siki/vue-datepicker-simple/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246743705,"owners_count":20826589,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-01T09:00:32.151Z","updated_at":"2025-04-02T02:31:40.162Z","avatar_url":"https://github.com/dai-siki.png","language":"JavaScript","funding_links":[],"categories":["UI组件"],"sub_categories":[],"readme":"# vue-datepicker-simple\n\n一款非常简单的vue日期选择组件\n\n\n## Update Log （更新日志\n\n### @1.5.0\n- 添加了\"时至今日\"功能（只能选今天之前）\n- 添加了\"今天不行\"功能（不能选今天）\n\n### @1.4.0\n- 兼容vue@2.0+（需要引入对应的组件，绑定value语法有不同，参考示例2）\n\n### @1.3.0\n- 添加了\"placeholder\"属性\n\n### @1.2.0\n- 添加了\"向前看\"功能（只能选今天及以后）\n\n### @1.1.0\n- 添加了年份选择功能\n- 可以自定义日期格式\n\n\n## Demo （示例\nvue@1.0+ [Click me 点我](http://dai-siki.github.io/vue-datepicker-simple/example/demo.html).\n\nvue@2.0+ [Click me 点我](http://dai-siki.github.io/vue-datepicker-simple/example2/demo.html).\n\n\n## Screenshot （截图\n![screenshot](screenshot/01.png)\n![screenshot](screenshot/02.png)\n\n## Browser Compatibility （浏览器兼容\nIE9+\n\n## Env （配置环境\nvue + webpack + es6\n\n\n## Install （安装\n\n#### npm\n\n```shell\n$ npm install vue-datepicker-simple\n```\n\n## Usage （使用\n\n#### Props （相关参数\n| 名称              | 类型               | 默认             | 说明                                         |\n| ----------------- | ----------------- | ---------------- | --------------------------------------------- |\n| value             | String         | today            | 要绑定的日期变量,值为空则日期面板初始化今天    |\n| field             | String            | \"\"               | 会给input标签添加name及id                   |\n| format            | String            | 'yyyy-mm-dd'     | 日期格式                                    |\n| forward           | Boolean           | false            | 向前看（只能选择今天及以后）              |\n| backward           | Boolean           | false            | 时至今日（只能选择今天之前）              |\n| noToday           | Boolean           | false            | 今天不行（不能选今天）              |\n| placeholder       | String            | \"\"               | 你懂的                                     |\n\n\n#### Example （示例 vue@1.0+\n```html\n\u003cdiv id=\"app\"\u003e\n\t\u003clabel for=\"myDate\"\u003e选择您的新婚之日\u003c/label\u003e\n\t\u003cdate-picker field=\"myDate\"\n\t\t\t\t placeholder=\"选择日期\"\n\t\t\t\t :value.sync=\"date\"\n\t\t\t\t format=\"yyyy/mm/dd\"\n\t\t\t\t :backward=\"false\"\n\t\t\t\t :no-today=\"true\"\n\t\t\t\t :forward=\"true\"\u003e\u003c/date-picker\u003e\n\u003c/div\u003e\n\n\u003cscript\u003e\nimport 'babel-polyfill'; //因为使用了es6的一些方法，需要babel垫片，如果你项目中已有相关兼容性方案，可忽略\nimport Vue from 'vue';\nimport myDatepicker from 'vue-datepicker-simple';\n\nnew Vue({\n    el: '#app',\n    data:{\n        date: ''\n    },\n    components:{\n        'date-picker': myDatepicker\n    }\n});\n\n\u003c/script\u003e\n```\n\n#### Example （示例 vue@2.0+\n```html\n\u003cdiv id=\"app\"\u003e\n\t\u003clabel for=\"myDate\"\u003e选择您的新婚之日\u003c/label\u003e\n\t\u003cdate-picker field=\"myDate\"\n\t\t\t\t placeholder=\"选择日期\"\n\t\t\t\t v-model=\"date\"\n\t\t\t\t format=\"yyyy/mm/dd\"\n\t\t\t\t :backward=\"false\"\n\t\t\t\t :no-today=\"true\"\n\t\t\t\t :forward=\"true\"\u003e\u003c/date-picker\u003e\n\u003c/div\u003e\n\n\u003cscript\u003e\nimport 'babel-polyfill'; //因为使用了es6的一些方法，需要babel垫片，如果你项目中已有相关兼容性方案，可忽略\nimport Vue from 'vue';\nimport myDatepicker from 'vue-datepicker-simple/datepicker-2.vue'; //引入对应的组件\n\nnew Vue({\n    el: '#app',\n    data:{\n        date: ''\n    },\n    components:{\n        'date-picker': myDatepicker\n    }\n});\n\u003c/script\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdai-siki%2Fvue-datepicker-simple","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdai-siki%2Fvue-datepicker-simple","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdai-siki%2Fvue-datepicker-simple/lists"}