Skip to content

Commit 1d5850f

Browse files
RomakitaTravis
authored and
Travis
committed
fix(MdDatepicker): Pick text button (confirm and cancel) from locale
1 parent 5a37ab8 commit 1d5850f

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

docs/app/pages/Configuration.vue

+4-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@
6262
shorterMonths: ['J', 'F', 'M', 'A', 'M', 'Ju', 'Ju', 'A', 'Se', 'O', 'N', 'D'],
6363

6464
// `0` stand for Sunday, `1` stand for Monday
65-
firstDayOfAWeek: 0
65+
firstDayOfAWeek: 0,
66+
67+
cancel: 'Cancel',
68+
confirm: 'Ok'
6669
}
6770
}
6871
</code-example>

src/components/MdDatepicker/MdDatepickerDialog.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@
7979
</div>
8080

8181
<md-dialog-actions class="md-datepicker-body-footer">
82-
<md-button class="md-primary" @click="onCancel">Cancel</md-button>
83-
<md-button v-if="!mdImmediately" class="md-primary" @click="onConfirm">Ok</md-button>
82+
<md-button class="md-primary" @click="onCancel">{{ locale.cancel }}</md-button>
83+
<md-button v-if="!mdImmediately" class="md-primary" @click="onConfirm">{{ locale.confirm }}</md-button>
8484
</md-dialog-actions>
8585
</div>
8686
</div>

src/material.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ const init = () => {
1616
months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
1717
shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'June', 'July', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'],
1818
shorterMonths: ['J', 'F', 'M', 'A', 'M', 'Ju', 'Ju', 'A', 'Se', 'O', 'N', 'D'],
19-
firstDayOfAWeek: 0
19+
firstDayOfAWeek: 0,
20+
cancel: 'Cancel',
21+
confirm: 'Ok'
2022
},
2123
router: {
2224
linkActiveClass: 'router-link-active'

0 commit comments

Comments
 (0)