diff --git a/src/components/form/FieldBase.vue b/src/components/form/FieldBase.vue index ea7693a71..2ba632e44 100644 --- a/src/components/form/FieldBase.vue +++ b/src/components/form/FieldBase.vue @@ -186,12 +186,16 @@ export default { transform: translateY(-50%) scale(0.75); } + [type='date'] ~ & { + @include minimized; + } + #{$root}--active &, #{$root}--filled &, #{$root}--minimized-label & { @include minimized; } - // We are seperating this declaration from the block above + // We are separating this declaration from the block above // because non-webkit engines will ignore the whole block, e.g. Gecko input:-webkit-autofill + & { @include minimized; diff --git a/src/components/form/HdInput.vue b/src/components/form/HdInput.vue index 0a8e43980..1a6288623 100644 --- a/src/components/form/HdInput.vue +++ b/src/components/form/HdInput.vue @@ -61,7 +61,7 @@ export default { default: 'text', }, value: { - type: [String, Number], + type: [String, Number, Date], default: '', }, placeholder: { diff --git a/src/stories/HdInput.stories.js b/src/stories/HdInput.stories.js index 2a64278e1..d1b9dc572 100644 --- a/src/stories/HdInput.stories.js +++ b/src/stories/HdInput.stories.js @@ -166,4 +166,20 @@ storiesOf('Components/Form/HdInput', module) value: '', }; }, + })) + .add('with type date', () => ({ + components: { HdInput }, + template: ` + + `, + data() { + return { + value: '', + }; + }, }));