Skip to content

Commit

Permalink
Fixed #2952 - Calendar: locale am & pm not work on time picker panel
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Oct 25, 2022
1 parent b9fd60a commit 7313daf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/calendar/Calendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
<button v-ripple class="p-link" :aria-label="$primevue.config.locale.am" @click="toggleAMPM($event)" type="button" :disabled="disabled">
<span class="pi pi-chevron-up"></span>
</button>
<span>{{ pm ? 'PM' : 'AM' }}</span>
<span>{{ pm ? $primevue.config.locale.pm : $primevue.config.locale.am }}</span>
<button v-ripple class="p-link" :aria-label="$primevue.config.locale.pm" @click="toggleAMPM($event)" type="button" :disabled="disabled">
<span class="pi pi-chevron-down"></span>
</button>
Expand Down Expand Up @@ -1348,7 +1348,7 @@ export default {
}
if (this.hourFormat === '12') {
output += date.getHours() > 11 ? ' PM' : ' AM';
output += date.getHours() > 11 ? ` ${this.$primevue.config.locale.pm}` : ` ${this.$primevue.config.locale.am}`;
}
return output;
Expand Down Expand Up @@ -1759,7 +1759,7 @@ export default {
throw 'Invalid Time';
}
this.pm = ampm === 'PM' || ampm === 'pm';
this.pm = ampm === this.$primevue.config.locale.am || ampm === this.$primevue.config.locale.am.toLowerCase();
let time = this.parseTime(timeString);
value.setHours(time.hour);
Expand Down

0 comments on commit 7313daf

Please sign in to comment.