diff --git a/.gitignore b/.gitignore index 8807004..c9019a2 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,8 @@ node_modules/ npm-debug.log test/coverage -dist yarn-error.log reports demo/dist +.idea +dist diff --git a/README.md b/README.md index 7505e2a..cf51bc5 100644 --- a/README.md +++ b/README.md @@ -113,12 +113,15 @@ phrases | `Object` | `{ok: 'Ok', cancel: 'Cancel'}` | Phrases. use12-hour | `Boolean` | `false` | Display 12 hour (AM/PM) mode hour-step | `Number` | `1` | Hour step. minute-step | `Number` | `1` | Minute step. -min-datetime | ISO 8601 `String` | `null` | Minimum datetime. -max-datetime | ISO 8601 `String` | `null` | Maximum datetime. +min-datetime | ISO 8601 `String` | `null` | Minimum datetime. NOTE: Has no effect when allowed-date-time-ranges is provided +max-datetime | ISO 8601 `String` | `null` | Maximum datetime. NOTE: Has no effect when allowed-date-time-ranges is provided auto | `Boolean` | `false` | Auto continue/close on select. week-start | `Number` | auto from locale if _weekstart_ is available or `1` | First day of the week. 1 is Monday and 7 is Sunday. flow | `Array` | Depends of *type* | Customize steps flow, steps available: time, date, month, year. Example: ['year', 'date', 'time'] title | `String` | `''` | Popup title. +hide-backdrop | `Boolean` | `false` | Show/Hide backdrop. +backdrop-click | `Boolean` | `true` | Enable/Disable backdrop click to cancel (outside click). +allowed-date-time-ranges | `Array` of `Array`'s of 2 `Datetime` | `[]` | Array of Arrays containing Allowed DateTime ranges i.e `[[DateTime.fromISO('2017-05-15T17:36'),DateTime.fromISO('2017-05-17T17:36')]]` (Allowed datetime ranges are the only selectable ranges) Input inherits all props not defined above but `style` and `class` will be inherited by root element. [See inheritAttrs option](https://vuejs.org/v2/api/#inheritAttrs) diff --git a/demo/index.html b/demo/index.html index 8876b66..67f393c 100644 --- a/demo/index.html +++ b/demo/index.html @@ -97,12 +97,11 @@
- Value: {{ datetimeEmpty }} -
+ auto> + + ++ Value: {{ datetimeEmpty }} +
+<datetime
+
+ <datetime
type="datetime"
v-model="datetimeEmpty"
input-class="my-class"
@@ -143,19 +142,48 @@ Complete demo
use12-hour
auto
></datetime>
+
- Value: {{ datetimeTheming }} -
++ Value: {{ datetimeEmpty }} +
+<datetime
+ type="datetime"
+ v-model="datetimeEmpty"
+ input-class="my-class"
+ value-zone="America/New_York"
+ zone="Asia/Shanghai"
+ :format="{ year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: '2-digit', timeZoneName: 'short' }"
+ :phrases="{ok: 'Continue', cancel: 'Exit'}"
+ :allowed-date-time-ranges="allowedDateTimeRanges"
+ :week-start="7"
+ use12-hour
+ auto
+ ></datetime>