I have this vuetifyjs text field and I want to remove the clock icon.
<v-text-field
v-model="model.end_time"
type="time">
</v-text-field>
I have already tried this code but it is not working
JavaScript
x
5
1
input[type="time"]::-webkit-calendar-picker-indicator {
2
background: none;
3
display:none;
4
}
5
Can someone help me with this
Advertisement
Answer
You need append css code globally. If you add css in <style scoped>
it will be not working.
JavaScript
1
17
17
1
import { createApp } from 'vue'
2
3
Vue.use(Vuetify);
4
5
new Vue({
6
el: "#app",
7
components: { App },
8
template: "<App/>"
9
});
10
11
createApp({
12
data() {
13
return {
14
count: 0
15
}
16
}
17
}).mount('#app')
JavaScript
1
27
27
1
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>
2
<script src="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.js"></script>
3
<link href="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.min.css" rel="stylesheet">
4
<style>
5
input[type="time"]::-webkit-calendar-picker-indicator {
6
background: none;
7
display: none;
8
}
9
</style>
10
<div id="app">
11
<br>
12
<br>
13
<v-text-field
14
value="12:30:00"
15
type="time"
16
></v-text-field>
17
</div>
18
19
<script>
20
new Vue({
21
el: "#app",
22
data: {
23
count: 1
24
}
25
});
26
27
</script>