Skip to content

Commit

Permalink
Fix primefaces#10754: DatePicker Now label
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Oct 2, 2023
1 parent 0d3a5b0 commit 0043304
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
today: 'Today',
clear: 'Clear',
now: 'Now',
year: 'Year',
month: 'Month',
week: 'Week',
Expand Down Expand Up @@ -1316,10 +1317,14 @@
var grid = this.options.flex ? 'grid' : 'ui-g';
var today = this.options.flex ? 'col-6 text-left' : 'ui-g-6';
var clear = this.options.flex ? 'col-6 text-right' : 'ui-g-6';
var todayLabel = this.options.locale.today;
if (this.options.showTime){
todayLabel = this.options.locale.now;
}
return '<div class="ui-datepicker-buttonbar ui-widget-header">' +
'<div class="' + grid + '">' +
'<div class="' + today + '">' +
'<button type="button" class="ui-today-button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only ' + this.options.todayButtonStyleClass + '"><span class="ui-button-text">' + this.options.locale.today + '</span></button>' +
'<button type="button" class="ui-today-button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only ' + this.options.todayButtonStyleClass + '"><span class="ui-button-text">' + todayLabel + '</span></button>' +
'</div>' +
'<div class="' + clear + '">' +
'<button type="button" class="ui-clear-button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only ' + this.options.clearButtonStyleClass + '"><span class="ui-button-text">' + this.options.locale.clear + '</span></button>' +
Expand Down

0 comments on commit 0043304

Please sign in to comment.