Skip to content

Commit

Permalink
feat: set current date in pickers
Browse files Browse the repository at this point in the history
fixes #292
  • Loading branch information
jacekkarczmarczyk committed Oct 25, 2018
1 parent 5fd0312 commit 2000629
Show file tree
Hide file tree
Showing 19 changed files with 25 additions and 28 deletions.
4 changes: 2 additions & 2 deletions src/examples/date-pickers/dateColorable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
export default {
data () {
return {
picker: null,
picker2: null
picker: new Date().toISOString().substr(0, 10),
picker2: new Date().toISOString().substr(0, 10)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/examples/date-pickers/dateCurrent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
export default {
data () {
return {
date1: null,
date1: new Date().toISOString().substr(0, 10),
date2: '2013-07-29'
}
}
Expand Down
7 changes: 2 additions & 5 deletions src/examples/date-pickers/dateDialogAndMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,9 @@
</v-flex>
<v-flex xs12 sm6 md4>
<v-menu
ref="menu2"
:close-on-content-click="false"
v-model="menu2"
:nudge-right="40"
:return-value.sync="date"
lazy
transition="scale-transition"
offset-y
Expand All @@ -72,8 +70,7 @@
prepend-icon="event"
readonly
></v-text-field>
<v-date-picker v-model="date" @input="$refs.menu2.save(date)"></v-date-picker>

<v-date-picker v-model="date" @input="menu2 = false"></v-date-picker>
</v-menu>
</v-flex>
<v-spacer></v-spacer>
Expand All @@ -83,7 +80,7 @@
<script>
export default {
data: () => ({
date: null,
date: new Date().toISOString().substr(0, 10),
menu: false,
modal: false,
menu2: false
Expand Down
4 changes: 2 additions & 2 deletions src/examples/date-pickers/dateEvents.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
export default {
data: () => ({
arrayEvents: null,
date1: null,
date2: null
date1: new Date().toISOString().substr(0, 10),
date2: new Date().toISOString().substr(0, 10)
}),
mounted () {
Expand Down
6 changes: 3 additions & 3 deletions src/examples/date-pickers/dateFormatting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@

<script>
export default {
data: () => ({
date: null,
dateFormatted: null,
data: vm => ({
date: new Date().toISOString().substr(0, 10),
dateFormatted: vm.formatDate(new Date().toISOString().substr(0, 10)),
menu1: false,
menu2: false
}),
Expand Down
2 changes: 1 addition & 1 deletion src/examples/date-pickers/dateIcons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
export default {
data () {
return {
picker: null
picker: new Date().toISOString().substr(0, 10)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/examples/date-pickers/dateInternationalization.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
export default {
data () {
return {
picker: null
picker: new Date().toISOString().substr(0, 10)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/examples/date-pickers/dateLight.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
export default {
data () {
return {
picker: null,
picker: new Date().toISOString().substr(0, 10),
landscape: false,
reactive: false
}
Expand Down
2 changes: 1 addition & 1 deletion src/examples/date-pickers/datePickerDate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<script>
export default {
data: () => ({
date: null,
date: new Date().toISOString().substr(0, 10),
pickerDate: null,
notes: [],
allNotes: [
Expand Down
2 changes: 1 addition & 1 deletion src/examples/date-pickers/dateReadonly.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
export default {
data () {
return {
date: null
date: new Date().toISOString().substr(0, 10)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/examples/date-pickers/dateWidth.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<script>
export default {
data: () => ({
date: '2018-03-02'
date: new Date().toISOString().substr(0, 10)
})
}
</script>
4 changes: 2 additions & 2 deletions src/examples/date-pickers/monthColorable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
export default {
data () {
return {
picker: null,
picker2: null
picker: new Date().toISOString().substr(0, 7),
picker2: new Date().toISOString().substr(0, 7)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/examples/date-pickers/monthCurrent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
export default {
data () {
return {
month1: null,
month1: new Date().toISOString().substr(0, 7),
month2: '2013-09'
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/examples/date-pickers/monthDialogAndMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<script>
export default {
data: () => ({
date: null,
date: new Date().toISOString().substr(0, 7),
menu: false,
modal: false
})
Expand Down
2 changes: 1 addition & 1 deletion src/examples/date-pickers/monthIcons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
export default {
data () {
return {
picker: null
picker: new Date().toISOString().substr(0, 7)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/examples/date-pickers/monthInternationalization.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
export default {
data () {
return {
picker: null
picker: new Date().toISOString().substr(0, 7)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/examples/date-pickers/monthLight.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
export default {
data () {
return {
picker: null,
picker: new Date().toISOString().substr(0, 7),
landscape: false
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/examples/date-pickers/monthReadonly.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
export default {
data () {
return {
date: null
date: new Date().toISOString().substr(0, 7)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/examples/date-pickers/monthWidth.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<script>
export default {
data: () => ({
date: '2018-03'
date: new Date().toISOString().substr(0, 7)
})
}
</script>

0 comments on commit 2000629

Please sign in to comment.