Skip to content

Commit

Permalink
fix(MdDatepicker): Pick text button (confirm and cancel) from locale
Browse files Browse the repository at this point in the history
  • Loading branch information
Romakita authored and Travis committed May 7, 2020
1 parent 5a37ab8 commit 1d5850f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion docs/app/pages/Configuration.vue
Expand Up @@ -62,7 +62,10 @@
shorterMonths: ['J', 'F', 'M', 'A', 'M', 'Ju', 'Ju', 'A', 'Se', 'O', 'N', 'D'],

// `0` stand for Sunday, `1` stand for Monday
firstDayOfAWeek: 0
firstDayOfAWeek: 0,

cancel: 'Cancel',
confirm: 'Ok'
}
}
</code-example>
Expand Down
4 changes: 2 additions & 2 deletions src/components/MdDatepicker/MdDatepickerDialog.vue
Expand Up @@ -79,8 +79,8 @@
</div>

<md-dialog-actions class="md-datepicker-body-footer">
<md-button class="md-primary" @click="onCancel">Cancel</md-button>
<md-button v-if="!mdImmediately" class="md-primary" @click="onConfirm">Ok</md-button>
<md-button class="md-primary" @click="onCancel">{{ locale.cancel }}</md-button>
<md-button v-if="!mdImmediately" class="md-primary" @click="onConfirm">{{ locale.confirm }}</md-button>
</md-dialog-actions>
</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion src/material.js
Expand Up @@ -16,7 +16,9 @@ const init = () => {
months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'June', 'July', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'],
shorterMonths: ['J', 'F', 'M', 'A', 'M', 'Ju', 'Ju', 'A', 'Se', 'O', 'N', 'D'],
firstDayOfAWeek: 0
firstDayOfAWeek: 0,
cancel: 'Cancel',
confirm: 'Ok'
},
router: {
linkActiveClass: 'router-link-active'
Expand Down

0 comments on commit 1d5850f

Please sign in to comment.