I am trying to write a Vue 3 dialog to hold a date picker and a radio button to collect the hour. It seems to take a great deal of space in the vertical direction.
For example I like to move the label for the radio button to be in line with the radio buttons and to reduce the amount of space taken by the rulers.

I have already turned of the chosen date, but I can not workout how to reduce the space allocated between components
Calling code
<template>
<v-container>
<v-row>
<v-col cols="12">
<date-dialog dialogTitle="Select the date"
startDate="2018/01/01"
endDate="2018/12/31"
year="2018"
:propDate="'2018-12-17T12:06:00'"
:propHourFormated="'6'"
@clicked="onDateClicked"
/>
</v-col>
</v-row>
</v-container>
</template>
<script>
import DateDialog from './components/DateDialog.vue';
export default {
methods: {
onDateClicked(value){
console.log("Value is " + value)
}
},
components: {
DateDialog,
},
}
</script>
<style>
/* remove calander frrom date picker */
.v-date-picker-header {
display: none
}
</style>
Dialog code
<template>
<div>
<v-container class="fill-height">
<v-row>
<v-col
cols="12"
sm="6"
md="4" >
<v-dialog
ref="dialog"
v-model="modal"
:return-value.sync="date"
persistent
width="290px" >
<template v-slot:activator="{ attrs }">
<!-- label="Select a date" -->
<v-text-field v-model="computedDateFormatted"
:label="dialogTitle" prepend-icon="mdi-calendar" readonly
@click="modal = true" v-bind="attrs" persistent-hint >
</v-text-field>
</template>
<v-card width="360px">
<v-date-picker v-model="date" color="primary"
:year="year" :min="startDate" :max="endDate"
scrollable :title="dialogTitle" hide-actions >
<!-- remove the selected date-->
<template v-slot:header></template>
</v-date-picker>
<hr>
<v-container>
<v-radio-group v-model="computedHourFormatted" label="Time" inline @change="this.RBchanged">
<v-radio label="00" value="0"></v-radio>
<v-radio label="06" value="6"></v-radio>
<v-radio label="12" value="12"></v-radio>
<v-radio label="18" value="18"></v-radio>
</v-radio-group>
</v-container>
<hr>
<v-card-actions>
<v-btn text color="primary" @click="this.dialogOK" >OK </v-btn>
<v-btn text color="primary" @click="this.dialogCancel" >Cancel </v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</v-col>
</v-row>
</v-container>
</div>
</template>
<script>
export default {
props: {
dialogTitle:{ type:String},
startDate:{ type:String},
endDate:{ type:String},
year:{ type:String},
propHourFormated:{ type:String},
propDateFormated:{ type:String},
propDate:{ type:String},
},
methods:{
// inserted to show that clicking of the radio buttons is working
RBchanged(){
console.log('changed')
console.log("VM "+this.hourFormatted);
},
dialogOK(){
this.modal=false;
console.log("OK " );
this.$emit('clicked',this.date);
},
dialogCancel(){
console.log("Cancelled " );
// reset to the orginal value
this.date= new Date(this.propDate);
this.dateFormatted= new Date(this.propDateFormatted);
this.modal=false;
this.$emit('clicked',this.date);
},
// write a date in to the textfield object, note expects to
// receive a date object
formatDate (mydate) {
if (!mydate)
return null
var hours="00",mins="00";
if(mydate.getHours() !== "" && mydate.getHours() !==0 ){
hours=mydate.getHours();
}
return mydate.getDate()+"-"+
mydate.toLocaleString('en-GB', { month: 'long' })+" "+
mydate.getUTCFullYear() + " "+
hours+ ":" +
mins
;
},
// set a value of the radio button should
// be a value of 0,6,12,18
formatHour(myhour) {
console.log("formatHour: new Hours " + myhour);
return myhour.toString();
},
},
computed: {
computedDateFormatted () {
this.date.setHours(this.hourFormatted)
return this.formatDate(this.date)
},
computedHourFormatted:{
get() {
console.log("XXXXget #" + this.date.getHours().toString()+"#");
return this.hourFormatted;
},
set(value){
console.log("SET:Formating hours " + value);
this.hourFormatted=value;
}
},
},
watch: {
date (val) {
//this.hourFormatted = this.formatHour(this.date.getHours())
this.dateFormatted = this.formatDate(this.date)
},
},
data () { return {
// starting value for the date picker
date: new Date(this.propDate),
// starting value for the textfield
dateFormatted: new Date(this.propDate),
// starting value for the radio buttons
hourFormatted: this.propHourFormated,
modal: false,
}},
};
</script>