Fix pickers

This commit is contained in:
Tim Zieger 2020-06-01 11:15:29 +02:00
parent f2397c6c92
commit 8e54997b87
2 changed files with 16 additions and 20 deletions

View File

@ -33,7 +33,7 @@
ref="menu" ref="menu"
v-model="menu" v-model="menu"
:close-on-content-click="false" :close-on-content-click="false"
:return-value.sync="newstartdate" :nudge-right="40"
transition="scale-transition" transition="scale-transition"
offset-y offset-y
min-width="290px" min-width="290px"
@ -47,10 +47,8 @@
v-on="on" v-on="on"
></v-text-field> ></v-text-field>
</template> </template>
<v-date-picker v-model="newstartdate" no-title scrollable> <v-date-picker v-model="newstartdate" @input="menu = false" no-title scrollable>
<v-spacer></v-spacer>
<v-btn text color="primary" @click="menu = false">Cancel</v-btn>
<v-btn text color="primary" @click="$refs.menu.save(newstartdate)">OK</v-btn>
</v-date-picker> </v-date-picker>
</v-menu> </v-menu>
</v-col> </v-col>
@ -59,7 +57,7 @@
ref="menu2" ref="menu2"
v-model="menu2" v-model="menu2"
:close-on-content-click="false" :close-on-content-click="false"
:return-value.sync="newenddate" :nudge-right="40"
transition="scale-transition" transition="scale-transition"
offset-y offset-y
min-width="290px" min-width="290px"
@ -73,10 +71,8 @@
v-on="on" v-on="on"
></v-text-field> ></v-text-field>
</template> </template>
<v-date-picker v-model="newenddate" no-title scrollable> <v-date-picker v-model="newenddate" @input="menu2 = false" no-title scrollable>
<v-spacer></v-spacer>
<v-btn text color="primary" @click="menu2 = false">Cancel</v-btn>
<v-btn text color="primary" @click="$refs.menu2.save(newenddate)">OK</v-btn>
</v-date-picker> </v-date-picker>
</v-menu> </v-menu>
</v-col> </v-col>
@ -107,6 +103,7 @@
v-if="menutime" v-if="menutime"
v-model="timestart" v-model="timestart"
full-width full-width
format="24hr"
@click:minute="$refs.menutime.save(timestart)" @click:minute="$refs.menutime.save(timestart)"
></v-time-picker> ></v-time-picker>
</v-menu> </v-menu>
@ -136,6 +133,7 @@
v-if="menutime2" v-if="menutime2"
v-model="timeend" v-model="timeend"
full-width full-width
format="24hr"
@click:minute="$refs.menutime2.save(timeend)" @click:minute="$refs.menutime2.save(timeend)"
></v-time-picker> ></v-time-picker>
</v-menu> </v-menu>

View File

@ -20,7 +20,7 @@
ref="menu" ref="menu"
v-model="menu" v-model="menu"
:close-on-content-click="false" :close-on-content-click="false"
:return-value.sync="newstartdate" :nudge-right="40"
transition="scale-transition" transition="scale-transition"
offset-y offset-y
min-width="290px" min-width="290px"
@ -34,10 +34,8 @@
v-on="on" v-on="on"
></v-text-field> ></v-text-field>
</template> </template>
<v-date-picker v-model="newstartdate" no-title scrollable> <v-date-picker v-model="newstartdate" @input="menu = false" no-title scrollable>
<v-spacer></v-spacer>
<v-btn text color="primary" @click="menu = false">Cancel</v-btn>
<v-btn text color="primary" @click="$refs.menu.save(newstartdate)">OK</v-btn>
</v-date-picker> </v-date-picker>
</v-menu> </v-menu>
</v-col> </v-col>
@ -46,7 +44,7 @@
ref="menu2" ref="menu2"
v-model="menu2" v-model="menu2"
:close-on-content-click="false" :close-on-content-click="false"
:return-value.sync="newenddate" :nudge-right="40"
transition="scale-transition" transition="scale-transition"
offset-y offset-y
min-width="290px" min-width="290px"
@ -60,10 +58,8 @@
v-on="on" v-on="on"
></v-text-field> ></v-text-field>
</template> </template>
<v-date-picker v-model="newenddate" no-title scrollable> <v-date-picker v-model="newenddate" @input="menu2 = false" no-title scrollable>
<v-spacer></v-spacer>
<v-btn text color="primary" @click="menu2 = false">Cancel</v-btn>
<v-btn text color="primary" @click="$refs.menu2.save(newenddate)">OK</v-btn>
</v-date-picker> </v-date-picker>
</v-menu> </v-menu>
</v-col> </v-col>
@ -94,6 +90,7 @@
v-if="menutime" v-if="menutime"
v-model="timestart" v-model="timestart"
full-width full-width
format="24hr"
@click:minute="$refs.menutime.save(timestart)" @click:minute="$refs.menutime.save(timestart)"
></v-time-picker> ></v-time-picker>
</v-menu> </v-menu>
@ -123,6 +120,7 @@
v-if="menutime2" v-if="menutime2"
v-model="timeend" v-model="timeend"
full-width full-width
format="24hr"
@click:minute="$refs.menutime2.save(timeend)" @click:minute="$refs.menutime2.save(timeend)"
></v-time-picker> ></v-time-picker>
</v-menu> </v-menu>