Unable to change width and height of vuejs-datepicker
First of all remove scoped from style portion. And obtain classname by inspecting datepicker element.
Here, in my case classname for startDate is .datetime-picker
input[data-v-a46a390c]
Now, apply to css like this:
.datetime-picker input[data-v-a46a390c] {
width: 150px;
height: 38px;
}
Using new Date() with v-date-picker doesn't work
Obviously (from the error message you're getting) v-datepicker
expects to be bound to a String
. You might want to try
data: {
date: new Date().toJSON(),
time: new Date().toJSON()
}
https://codepen.io/connexo/pen/ypWxLv
Also see Vuetify API docs (which explicitly states it expects v-model
to be of type String
):
v-model String null Controls the displayed date. Must use ISO 8601 format.
Hide input field from vuejs-datepicker
You need to use the >>>
combinator in order to deeply select the input
tag:
.datePickerDiv >>> input {
border: none;
background: transparent;
}
This is because you're using the scoped
attribute on your style tag. scoped
will only work to apply styling to child components directly referenced in your current Vue component. In this case, datepicker is creating its own child input
which will not be affected by the style, unless you use the deep selector shown above.
Related Topics
Text Overlapping Items in Dropdown Items
Facebook Like Button - How to Disable Comment Pop Up Box
Flex-Basis for Wrapping Columns
Why Is Blue Circle Not Spinning in The Center of Itself
Ie 8. Gradient Background+Image
Facebook/Twitter Style Photos Grid Style Layout
How to Import CSS from Node_Modules in Webpack Angular2 App
Want to Move a Particular Div to Right
Bootstrap 3: Using Img-Circle, How to Get Circle from Non-Square Image
Building CSS with Tailwindcss Not Working
Cannot Get CSS to Work in Itextsharp (5.4.3) When Making Pdf
Issue with Embedded Svg Images in Dark Mode
How to Style an Independent Tableview Column
My Dropkick Plugin's Dropdown Looking Strange