From 8c26c05866b16aed517b380267529334f81ebaec Mon Sep 17 00:00:00 2001 From: mxie <15623530290@163.com> Date: Thu, 12 Apr 2018 16:20:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BF=AE=E6=94=B9=E8=AF=AD?= =?UTF-8?q?=E8=A8=80=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 56 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index d57356c..87e6f0e 100644 --- a/README.md +++ b/README.md @@ -48,26 +48,42 @@ export default { ``` ### Attributes -| Prop | Type | Default | Description | -|---------------------|---------------|-------------|---------------------------------------------------| -| type | String | 'date' | select datepicker or datetimepicker(date/datetime)| -| range | Boolean | false | if true, the type is daterange or datetimerange | -| confirm | Boolean | false | if true, need click the button to change the value| -| format | String | yyyy-MM-dd | Date formatting string | -| lang | String | zh | Translation (en/zh/es/pt-br/fr/ru/de/it/cs) | -| placeholder | String | | input placeholder text | -| width | String/Number | 210 | input size | -| disabled-days | Array | [] | Days in YYYY-MM-DD format to disable | -| not-before | String/Date | '' | Disable all dates before new Date(not-before) | -| not-after | String/Date | '' | Disable all dates after new Date(not-after) | -| shortcuts | Boolean/Array | true | the shortcuts for the range picker | -| time-picker-options | Object | {} | set timePickerOptions(start, step, end) | -| minute-step | Number | 0 | if > 0 don't show the second picker(0 - 60) | -| first-day-of-week | Number | 7 | set the first day of week (1-7) | -| input-class | String | 'mx-input' | the input class name | -| confirm-text | String | 'OK' | the default text to display on confirm button | -| disabled | Boolean | false | Disable the component | -| editable | Boolean | false | if true, user can type it(only the range is false)| +| Prop | Type | Default | Description | +|---------------------|---------------|-------------|-----------------------------------------------------| +| type | String | 'date' | select datepicker or datetimepicker(date/datetime) | +| range | Boolean | false | if true, the type is daterange or datetimerange | +| confirm | Boolean | false | if true, need click the button to change the value | +| format | String | yyyy-MM-dd | Date formatting string | +| lang | String/Object | zh | Translation (en/zh/es/pt-br/fr/ru/de/it/cs)(custom) | +| placeholder | String | | input placeholder text | +| width | String/Number | 210 | input size | +| disabled-days | Array | [] | Days in YYYY-MM-DD format to disable | +| not-before | String/Date | '' | Disable all dates before new Date(not-before) | +| not-after | String/Date | '' | Disable all dates after new Date(not-after) | +| shortcuts | Boolean/Array | true | the shortcuts for the range picker | +| time-picker-options | Object | {} | set timePickerOptions(start, step, end) | +| minute-step | Number | 0 | if > 0 don't show the second picker(0 - 60) | +| first-day-of-week | Number | 7 | set the first day of week (1-7) | +| input-class | String | 'mx-input' | the input class name | +| confirm-text | String | 'OK' | the default text to display on confirm button | +| disabled | Boolean | false | Disable the component | +| editable | Boolean | false | if true, user can type it(only the range is false) | + +#### lang +* String (en/zh/es/pt-br/fr/ru/de/it/cs) +* Object + +```JavaScript +{ + days: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], + months: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], + pickers: ['next 7 days', 'next 30 days', 'previous 7 days', 'previous 30 days'], + placeholder: { + date: 'Select Date', + dateRange: 'Select Date Range' + } +} +``` #### shortcuts * true - show the default shortcuts