From d3d979771b5d51b5c0f961a758bb7eef04597107 Mon Sep 17 00:00:00 2001 From: Mario Juarez Date: Mon, 9 Jul 2018 10:44:43 +0200 Subject: [PATCH] Add `input-id` parameter to avoid id collisions --- README.md | 1 + src/Datetime.vue | 5 +++++ test/specs/Datetime.spec.js | 10 ++++++++++ 3 files changed, 16 insertions(+) diff --git a/README.md b/README.md index 00689e2..58959a1 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,7 @@ Parameter | Type | Default | Description --------- | ---- | ------- | ----------- v-model (*required*) | ISO 8601 `String` | - | Datetime. type | `String` | `date` | Picker type. date or datetime. +input-id | `String` | `''` | Id for the input. input-class | `String` | `''` | Class for the input. hidden-name | `String` | `null` | Name for hidden input with raw value. See #51. value-zone | `String` | `UTC` | Time zone for the value. diff --git a/src/Datetime.vue b/src/Datetime.vue index f607f51..b14d0a8 100644 --- a/src/Datetime.vue +++ b/src/Datetime.vue @@ -2,6 +2,7 @@
`, + { + components: { Datetime } + }) + + expect(vm.$('.vdatetime-input')).to.have.id('id-name') + }) + it('input should inherit attributes', function () { const vm = createVM(this, ``,