Skip to content

Commit

Permalink
🐛 Fix the UI for inputs of type date (#1173)
Browse files Browse the repository at this point in the history
  • Loading branch information
leandroinacio authored Jul 11, 2023
1 parent ba51783 commit e821bdc
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/components/form/FieldBase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/components/form/HdInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default {
default: 'text',
},
value: {
type: [String, Number],
type: [String, Number, Date],
default: '',
},
placeholder: {
Expand Down
16 changes: 16 additions & 0 deletions src/stories/HdInput.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,20 @@ storiesOf('Components/Form/HdInput', module)
value: '',
};
},
}))
.add('with type date', () => ({
components: { HdInput },
template: `
<HdInput
v-model="value"
name="test"
label="Label"
type="date"
/>
`,
data() {
return {
value: '',
};
},
}));

0 comments on commit e821bdc

Please sign in to comment.