diff --git a/README.md b/README.md index 3377763..ad3a2d3 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,43 @@ # vue2-datepicker -> A Vue.js project +> A Datepicker Component For Vue2 -## Build Setup +## Demo +<> +![image](https://github.com/mengxiong10/vue2-datepicker/tree/master/screenshot/demo.png) -``` bash -# install dependencies -npm install +## Usage -# serve with hot reload at localhost:8080 -npm run dev +```html + -# build for production with minification -npm run build + ``` +## Attributes + +| Prop | Type | Default | Description | +|-----------------|---------------|-------------|---------------------------------------| +| range | Boolean | false | if true, the type is daterange | +| format | String | yyyy-MM-dd | Date formatting string | +| language | String | zh | Translation (en/zh) | +| placeholder | String | | input placeholder text | +| width | String/Number | 210 | input size | + -For detailed explanation on how things work, consult the [docs for vue-loader](http://vuejs.github.io/vue-loader). diff --git a/screenshot/demo.PNG b/screenshot/demo.PNG new file mode 100644 index 0000000..3bef659 Binary files /dev/null and b/screenshot/demo.PNG differ diff --git a/src/App.vue b/src/App.vue index 6146f61..6cec042 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,12 +1,12 @@ @@ -19,7 +19,7 @@ export default { components:{ DatePicker }, data () { return { - value1:'2015-10-10', + value1:'2017-5-9', value2:'', } } diff --git a/src/datepicker/calendar-panel.vue b/src/datepicker/calendar-panel.vue index 12a6755..a1e0168 100644 --- a/src/datepicker/calendar-panel.vue +++ b/src/datepicker/calendar-panel.vue @@ -3,8 +3,8 @@
« - {{now.getFullYear() + '年'}} - {{now.getMonth() + 1 + '月'}} + {{months[now.getMonth()]}} + {{now.getFullYear()}} »
@@ -29,6 +29,8 @@